Mercurial > gemma
diff pkg/controllers/routes.go @ 5028:d727641911a5
Moved import desision logic to import queue (where it belongs).
Major change: StageDone of the import job is executed by the original user
who does the import.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 18 Mar 2020 17:52:00 +0100 |
parents | 3f704ebad0c5 |
children | 2dcfab23dc86 445daeefca7b |
line wrap: on
line diff
--- a/pkg/controllers/routes.go Wed Mar 18 14:52:36 2020 +0100 +++ b/pkg/controllers/routes.go Wed Mar 18 17:52:00 2020 +0100 @@ -313,6 +313,7 @@ api.Handle("/imports", waterwayAdmin(&mw.JSONHandler{ Input: func(*http.Request) interface{} { return &[]models.Review{} }, Handle: reviewImports, + NoConn: true, })).Methods(http.MethodPatch) api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&mw.JSONHandler{ @@ -323,6 +324,7 @@ api.Handle("/imports/{id:[0-9]+}/{state:(?:accepted|declined)}", waterwayAdmin(&mw.JSONHandler{ Handle: reviewImport, + NoConn: true, })).Methods(http.MethodPut) // Handler to serve data to the client.