Mercurial > gemma
annotate pkg/controllers/manualimports.go @ 5591:0011f50cf216 surveysperbottleneckid
Removed no longer used alternative api for surveys/ endpoint.
As bottlenecks in the summary for SR imports are now identified by
their id and no longer by the (not guarantied to be unique!) name,
there is no longer the need to request survey data by the name+date
tuple (which isn't reliable anyway). So the workaround was now
reversed.
author | Sascha Wilde <wilde@sha-bang.de> |
---|---|
date | Wed, 06 Apr 2022 13:30:29 +0200 |
parents | 5f47eeea988d |
children | 6270951dda28 |
rev | line source |
---|---|
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 // This is Free Software under GNU Affero General Public License v >= 3.0 |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 // without warranty, see README.md and license for details. |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 // |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 // SPDX-License-Identifier: AGPL-3.0-or-later |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 // License-Filename: LICENSES/AGPL-3.0.txt |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 // |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 // Copyright (C) 2018 by via donau |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 // – Österreichische Wasserstraßen-Gesellschaft mbH |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 // Software engineering by Intevation GmbH |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 // |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 // Author(s): |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 // * Sascha L. Teichmann <sascha.teichmann@intevation.de> |
1667
aaa05d3c4aac
Deduplicated code for triggering manual imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1646
diff
changeset
|
13 // * Raimund Renkert <raimund.renkert@intevation.de> |
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 package controllers |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 import ( |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
18 "net/http" |
1708
49e047c2106e
Imports: Made imports re-runnable if they fail.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1677
diff
changeset
|
19 "time" |
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 |
4242
1458c9b0fdaa
Made the sql.Conn in function accessible via the context of the request.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2058
diff
changeset
|
21 "github.com/gorilla/mux" |
1458c9b0fdaa
Made the sql.Conn in function accessible via the context of the request.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2058
diff
changeset
|
22 |
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 "gemma.intevation.de/gemma/pkg/auth" |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 "gemma.intevation.de/gemma/pkg/common" |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 "gemma.intevation.de/gemma/pkg/imports" |
5490
5f47eeea988d
Use own logging package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4244
diff
changeset
|
26 "gemma.intevation.de/gemma/pkg/log" |
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 "gemma.intevation.de/gemma/pkg/models" |
4244
4394daeea96a
Moved JSONHandler into middleware package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4243
diff
changeset
|
28 |
4394daeea96a
Moved JSONHandler into middleware package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4243
diff
changeset
|
29 mw "gemma.intevation.de/gemma/pkg/middleware" |
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 ) |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 |
2058
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
32 func importModel(req *http.Request) interface{} { |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
33 kind := mux.Vars(req)["kind"] |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
34 ctor := imports.ImportModelForJobKind(imports.JobKind(kind)) |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
35 if ctor == nil { |
5490
5f47eeea988d
Use own logging package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4244
diff
changeset
|
36 log.Errorf("unknown job kind '%s'.\n", kind) |
2058
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
37 panic(http.ErrAbortHandler) |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
38 } |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
39 return ctor() |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
40 } |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
41 |
4244
4394daeea96a
Moved JSONHandler into middleware package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4243
diff
changeset
|
42 func manualImport(req *http.Request) (jr mw.JSONResult, err error) { |
2025
070ac9dd61a1
Bring manual imports to new import modeling.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1993
diff
changeset
|
43 |
2058
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
44 kind := imports.JobKind(mux.Vars(req)["kind"]) |
4244
4394daeea96a
Moved JSONHandler into middleware package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4243
diff
changeset
|
45 input := mw.JSONInput(req) |
2058
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
46 what := imports.ConvertToInternal(kind, input) |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
47 if what == nil { |
4244
4394daeea96a
Moved JSONHandler into middleware package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4243
diff
changeset
|
48 err = mw.JSONError{ |
2058
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
49 Code: http.StatusInternalServerError, |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
50 Message: "Unable to convert import models", |
1667
aaa05d3c4aac
Deduplicated code for triggering manual imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1646
diff
changeset
|
51 } |
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 return |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
53 } |
2058
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
54 |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
55 var serialized string |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
56 if serialized, err = common.ToJSONString(what); err != nil { |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
57 return |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
58 } |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
59 |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
60 var ( |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
61 due time.Time |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
62 trys *int |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
63 waitRetry *time.Duration |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
64 email bool |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
65 ) |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
66 |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
67 if qctg, ok := input.(models.QueueConfigurationGetter); ok { |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
68 qct := qctg.GetQueueConfiguration() |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
69 if qct.Due != nil { |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
70 due = qct.Due.Time |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
71 } |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
72 trys = qct.Trys |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
73 if qct.WaitRetry != nil { |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
74 waitRetry = &qct.WaitRetry.Duration |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
75 } |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
76 } |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
77 |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
78 if etg, ok := input.(models.EmailTypeGetter); ok { |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
79 email = etg.GetEmailType().Email |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
80 } |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
81 |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
82 session, _ := auth.GetSession(req) |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
83 |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
84 var jobID int64 |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
85 if jobID, err = imports.AddJob( |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
86 kind, |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
87 due, |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
88 trys, |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
89 waitRetry, |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
90 session.User, |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
91 email, |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
92 serialized, |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
93 ); err != nil { |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
94 return |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
95 } |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
96 |
5490
5f47eeea988d
Use own logging package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4244
diff
changeset
|
97 log.Infof("added import #%d to queue\n", jobID) |
2058
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
98 |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
99 result := struct { |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
100 ID int64 `json:"id"` |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
101 }{ |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
102 ID: jobID, |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
103 } |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
104 |
4244
4394daeea96a
Moved JSONHandler into middleware package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4243
diff
changeset
|
105 jr = mw.JSONResult{ |
2058
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
106 Code: http.StatusCreated, |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
107 Result: &result, |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
108 } |
09f9ae3d0526
Imports: Handle manual imports with a single route using the shortnames of the imports to distiquish between them.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2044
diff
changeset
|
109 return |
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
110 } |