Mercurial > gemma
annotate pkg/controllers/manualimports.go @ 2277:5f3110aa1ad1
made configuration page accessible for waterway admins
User roles define what the configuration page shows.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Fri, 15 Feb 2019 10:57:50 +0100 |
parents | 09f9ae3d0526 |
children | 1458c9b0fdaa |
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 "database/sql" |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
19 "log" |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 "net/http" |
1708
49e047c2106e
Imports: Made imports re-runnable if they fail.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1677
diff
changeset
|
21 "time" |
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 |
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" |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
26 "gemma.intevation.de/gemma/pkg/models" |
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
|
27 "github.com/gorilla/mux" |
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 ) |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 |
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
|
30 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
|
31 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
|
32 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
|
33 if ctor == 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
|
34 log.Printf("error: Unknown job kind '%s'.\n", 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 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
|
36 } |
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 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
|
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 |
1667
aaa05d3c4aac
Deduplicated code for triggering manual imports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1646
diff
changeset
|
40 func manualImport( |
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
|
41 input 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
|
42 req *http.Request, |
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
|
43 _ *sql.Conn, |
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 ) (jr JSONResult, err error) { |
2025
070ac9dd61a1
Bring manual imports to new import modeling.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1993
diff
changeset
|
45 |
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 kind := imports.JobKind(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
|
47 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
|
48 if what == 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
|
49 err = JSONError{ |
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 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
|
51 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
|
52 } |
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
53 return |
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 } |
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
|
55 |
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 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
|
57 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
|
58 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
|
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 |
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 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
|
62 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
|
63 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
|
64 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
|
65 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
|
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 |
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 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
|
69 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
|
70 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
|
71 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
|
72 } |
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 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
|
74 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
|
75 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
|
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 |
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 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
|
80 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
|
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 |
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 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
|
84 |
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 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
|
86 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
|
87 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
|
88 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
|
89 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
|
90 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
|
91 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
|
92 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
|
93 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
|
94 ); 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
|
95 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
|
96 } |
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
|
97 |
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 log.Printf("info: added import #%d to queue\n", 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
|
99 |
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 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
|
101 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
|
102 }{ |
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 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
|
104 } |
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
|
105 |
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 jr = JSONResult{ |
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 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
|
108 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
|
109 } |
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
|
110 return |
1534
165f31b71042
Bottleneck import: Added /api/imports/bottleneck POST endpoint.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 } |