fix(integration): return correct value list

This commit is contained in:
fiftin 2024-03-04 18:39:15 +01:00
parent 7b6394ae12
commit e944cf2db8
2 changed files with 3 additions and 2 deletions

View File

@ -35,8 +35,9 @@ func GetIntegrationExtractValue(w http.ResponseWriter, r *http.Request) {
}
func GetIntegrationExtractValues(w http.ResponseWriter, r *http.Request) {
project := context.Get(r, "project").(db.Project)
extractor := context.Get(r, "extractor").(db.IntegrationExtractor)
values, err := helpers.Store(r).GetIntegrationExtractValues(0, helpers.QueryParams(r.URL), extractor.ID)
values, err := helpers.Store(r).GetIntegrationExtractValues(project.ID, helpers.QueryParams(r.URL), extractor.ID)
if err != nil {
helpers.WriteError(w, err)

View File

@ -161,7 +161,7 @@ func (d *BoltDb) GetIntegrationExtractValues(projectID int, params db.RetrieveQu
values = make([]db.IntegrationExtractValue, 0)
var allValues []db.IntegrationExtractValue
err = d.getObjects(projectID, db.IntegrationExtractValueProps, db.RetrieveQueryParams{}, nil, &allValues)
err = d.getObjects(projectID, db.IntegrationExtractValueProps, params, nil, &allValues)
if err != nil {
return