D. Berge
620d5ccf47
Add /version API endpoint
2023-11-02 19:48:30 +01:00
D. Berge
656f776262
Do not cache any responses containing cookies
2023-11-02 13:24:40 +01:00
D. Berge
89cb237f8d
Use setContentDisposition()
2023-10-29 20:38:58 +01:00
D. Berge
2365789d48
Merge branch '281-modify-planner-endpoint-s' into 'devel'
...
Resolve "Modify planner endpoint(s)"
Closes #281
See merge request wgp/dougal/software!49
2023-10-25 14:26:23 +00:00
D. Berge
b5aafe42ad
Add YAML support to events GET endpoint
2023-10-23 19:24:03 +02:00
D. Berge
025f3f774d
Add YAML and CSV support to project configuration GET endpoint
2023-10-23 19:22:50 +02:00
D. Berge
1bb06938b1
Add CSV export handler to main event log endpoint.
...
Closes #245 .
2023-10-23 17:28:30 +02:00
D. Berge
851369a0b4
Invalidate planner endpoint cache when setting remarks
2023-10-23 14:58:41 +02:00
D. Berge
2d1e1e9532
Modify return payload of planner endpoint.
...
Previous:
[
{ sequence: …},
{ sequence: …},
…
]
Current:
{
remarks: "…",
sequences: [
{ sequence: …},
{ sequence: …},
…
]
}
2023-10-23 14:53:32 +02:00
D. Berge
09ff96ceee
Add events change API endpoint
2023-10-17 11:15:36 +02:00
D. Berge
f231acf109
Add events change middleware
2023-10-17 11:15:06 +02:00
D. Berge
0829ea3ea1
Save a copy of the headers not the original.
...
Otherwise ExpressJS will complain about trying to modify
headers that have already been sent.
2023-09-24 12:17:16 +02:00
D. Berge
ceccc42050
Don't cache response ETags for QC endpoints
2023-09-18 12:06:38 +02:00
D. Berge
a1779ef488
Do not cache /navdata endpoint responses
2023-09-14 13:20:16 +02:00
D. Berge
5239dece1e
Do not cache GIS endpoint responses
2023-09-14 13:19:57 +02:00
D. Berge
a7d7837816
Allow only admins to patch project configurations
2023-09-14 13:19:16 +02:00
D. Berge
ebcfc7df47
Allow everyone to access project configuration.
...
This is necessary as it is requested by various parts of the
frontend.
Consider more granular access control.
2023-09-14 13:17:28 +02:00
D. Berge
33618b6b82
Do not cache Set-Cookie headers
2023-09-14 13:13:47 +02:00
D. Berge
5a2af5c49e
Add CSV output option for events log
2023-09-13 21:58:06 +02:00
D. Berge
707889be42
Refactor layer API endpoint and database functions.
...
- A single get() function is used both to list all available
layers, if no layer name is given, or a single layer.
- The database no longer holds the actual layer contents,
only the path to the layer file(s), so the list() function
is now redundant as we return the full payload in every case.
- The /gis/layer and /gis/layer/:name endpoints now have the same
payload structure.
2023-09-12 19:29:02 +02:00
D. Berge
36d5862375
Add map layer middleware and API endpoints
2023-09-11 10:15:19 +02:00
D. Berge
4f165b0c83
Revert behaviour of new jwt-express version.
...
Fixes breakage introduced in commit
cd00f8b995 .
2023-09-10 14:09:01 +02:00
D. Berge
2c86944a51
Merge branch '262-preset-remarks-and-labels-no-longer-working-with-api-0-4-0' into 'devel'
...
Resolve "Preset remarks and labels no longer working with API 0.4.0"
Closes #262
See merge request wgp/dougal/software!36
2023-09-10 10:10:22 +00:00
D. Berge
941d15c1bc
Return labels directly from project configuration.
...
NOTE: This is a breaking API change. Before this it returned an
array of labels, now it returns an object.
2023-09-10 11:59:38 +02:00
D. Berge
cd00f8b995
Breaking-change Node package udpates (server)
2023-09-10 11:49:56 +02:00
D. Berge
78fb34d049
Update the API version number
2023-09-09 16:56:52 +02:00
D. Berge
c4b330b2bb
Don't cache ETags for /files/ endpoint.
...
As we have no practical way of invalidating those.
2023-09-02 16:06:31 +02:00
D. Berge
308eda6342
Use ETag middleware
2023-09-02 15:29:39 +02:00
D. Berge
e8b1cb27f1
Add ETag middleware
2023-09-02 15:29:24 +02:00
D. Berge
70cf59bb4c
Add API files endpoint.
...
Used to download files. It relies on `imports.paths` being set
appropriately in `etc/config.yaml` to indicate which parts of
the filesystem are accessible to users via Dougal.
2023-08-30 13:51:31 +02:00
D. Berge
675c19f060
Fix whitespace
2023-08-30 13:47:51 +02:00
D. Berge
6721b1b96b
Add API endpoint for patching a project
2023-08-30 13:47:02 +02:00
D. Berge
fe9d3563a0
Add API endpoint to delete a project
2023-08-23 19:26:27 +02:00
D. Berge
38a07dffc6
Add API endpoint to retrieve project configuration.
...
Only available to users with at least `write` access.
2023-08-23 19:26:27 +02:00
D. Berge
1a6500308f
Add API endpoint for creating a project
2023-08-23 19:26:27 +02:00
D. Berge
6033b45ed3
Refactor API middleware.
...
The middleware naming is kept consistent with the HTTP verb that
they handle.
2023-08-23 19:17:20 +02:00
D. Berge
33edef6647
Use modified body-parser accepting YAML
2023-08-23 19:12:44 +02:00
D. Berge
aa7cbed611
Do not require authentication to query API version
2023-05-18 18:32:26 +02:00
D. Berge
89061f6411
Print port and prefix on startup
2023-05-18 18:30:48 +02:00
D. Berge
6d8a199a3c
Allow setting IP to listen on.
...
Running on bare metal, 127.0.0.1 is a sensible choice of address
to bind on, but that is not the case when running inside a
container, so we add the ability to choose which IP to listen on.
This can be given via the environment variable HTTP_HOST when
starting the server or, if used as a module, as the second
argument of the start(port, host, path) function.
2023-04-07 09:04:51 +02:00
D. Berge
3ed8339aa3
Migrate more console messages to debug()
2022-05-12 22:09:08 +02:00
D. Berge
546bc45861
Remove dead code
2022-05-04 18:35:20 +02:00
D. Berge
6c8515a879
Add QC results accept/unaccept API endpoints
2022-05-04 18:11:05 +02:00
D. Berge
bb9340a0af
Add QC results accept/unaccept middleware.
...
This middleware can only deal with shot QCs, not sequence-wide QCs.
2022-05-04 17:22:18 +02:00
D. Berge
e3a3bdb153
Clean up whitespace.
...
Commands used:
find . -type f -name '*.js'| while read FILE; do if echo $FILE |grep -qv node_modules; then sed -ri 's/^\s+$//' "$FILE"; fi; done
find . -type f -name '*.vue'| while read FILE; do if echo $FILE |grep -qv node_modules; then sed -ri 's/^\s+$//' "$FILE"; fi; done
find . -type f -name '*.py'| while read FILE; do if echo $FILE |grep -qv node_modules; then sed -ri 's/^\s+$//' "$FILE"; fi; done
2022-04-29 14:48:21 +02:00
D. Berge
74d6f0b9a0
Accept mime query parameter
2022-04-16 17:18:04 +02:00
D. Berge
cf475ce2df
Adapt middleware to new database schema.
...
As introduced by commit 0c6567d8f8 .
2022-04-16 17:18:04 +02:00
D. Berge
186615d988
Add comments for ease of browsing
2022-03-09 17:43:51 +01:00
D. Berge
666f91de18
Add QC results API endpoint
2022-03-09 17:43:10 +01:00
D. Berge
c8ce786e39
Add API middleware for returning QC results
2022-03-09 17:41:27 +01:00