Skip to content

Commit

Permalink
Add new API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Jun 24, 2024
1 parent 43be76d commit e7c7513
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 88 deletions.
197 changes: 111 additions & 86 deletions api/test/fixtures/get_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,36 @@
"query": false,
"res": true
},
"GET /connection/:connectionid/layer/:layerid/task": {
"body": false,
"query": false,
"res": true
},
"DELETE /connection/:connectionid/layer/:layerid/task": {
"body": false,
"query": false,
"res": true
},
"POST /connection/:connectionid/layer/:layerid/task/invoke": {
"body": false,
"query": false,
"res": true
},
"GET /connection/:connectionid/layer/:layerid/task/logs": {
"body": false,
"query": false,
"res": true
},
"GET /connection/:connectionid/layer/:layerid/task/schema": {
"body": false,
"query": true,
"res": true
},
"POST /connection/:connectionid/layer/:layerid/task": {
"body": false,
"query": false,
"res": true
},
"GET /connection/:connectionid/token": {
"body": false,
"query": true,
Expand Down Expand Up @@ -349,71 +379,6 @@
"query": true,
"res": true
},
"GET /iconset": {
"body": false,
"query": true,
"res": true
},
"POST /iconset": {
"body": true,
"query": false,
"res": true
},
"PATCH /iconset/:iconset": {
"body": true,
"query": false,
"res": true
},
"GET /iconset/:iconset": {
"body": false,
"query": true,
"res": true
},
"DELETE /iconset/:iconset": {
"body": false,
"query": false,
"res": true
},
"POST /iconset/:iconset/icon": {
"body": true,
"query": false,
"res": true
},
"GET /icon": {
"body": false,
"query": true,
"res": true
},
"GET /iconset/:iconset/icon/:icon": {
"body": false,
"query": false,
"res": true
},
"PATCH /iconset/:iconset/icon/:icon": {
"body": true,
"query": false,
"res": true
},
"DELETE /iconset/:iconset/icon/:icon": {
"body": false,
"query": false,
"res": true
},
"GET /iconset/:iconset/icon/:icon/raw": {
"body": false,
"query": true,
"res": false
},
"GET /icon/sprite:size?.json": {
"body": false,
"query": true,
"res": false
},
"GET /icon/sprite:size?.png": {
"body": false,
"query": true,
"res": false
},
"POST /import": {
"body": true,
"query": false,
Expand Down Expand Up @@ -589,6 +554,71 @@
"query": false,
"res": true
},
"GET /iconset": {
"body": false,
"query": true,
"res": true
},
"POST /iconset": {
"body": true,
"query": false,
"res": true
},
"PATCH /iconset/:iconset": {
"body": true,
"query": false,
"res": true
},
"GET /iconset/:iconset": {
"body": false,
"query": true,
"res": true
},
"DELETE /iconset/:iconset": {
"body": false,
"query": false,
"res": true
},
"POST /iconset/:iconset/icon": {
"body": true,
"query": false,
"res": true
},
"GET /icon": {
"body": false,
"query": true,
"res": true
},
"GET /iconset/:iconset/icon/:icon": {
"body": false,
"query": false,
"res": true
},
"PATCH /iconset/:iconset/icon/:icon": {
"body": true,
"query": false,
"res": true
},
"DELETE /iconset/:iconset/icon/:icon": {
"body": false,
"query": false,
"res": true
},
"GET /iconset/:iconset/icon/:icon/raw": {
"body": false,
"query": true,
"res": false
},
"GET /icon/sprite:size?.json": {
"body": false,
"query": true,
"res": false
},
"GET /icon/sprite:size?.png": {
"body": false,
"query": true,
"res": false
},
"GET /marti/group": {
"body": false,
"query": true,
Expand Down Expand Up @@ -729,11 +759,6 @@
"query": false,
"res": true
},
"GET /search/reverse/:longitude/:latitude": {
"body": false,
"query": false,
"res": true
},
"GET /server": {
"body": false,
"query": false,
Expand All @@ -749,47 +774,42 @@
"query": false,
"res": true
},
"GET /task": {
"GET /search/reverse/:longitude/:latitude": {
"body": false,
"query": false,
"res": true
},
"GET /task/:task": {
"GET /task": {
"body": false,
"query": false,
"query": true,
"res": true
},
"DELETE /task/:task/version/:version": {
"body": false,
"POST /task": {
"body": true,
"query": false,
"res": true
},
"GET /connection/:connectionid/layer/:layerid/task": {
"GET /task/raw": {
"body": false,
"query": false,
"res": true
},
"DELETE /connection/:connectionid/layer/:layerid/task": {
"GET /task/raw/:task": {
"body": false,
"query": false,
"res": true
},
"POST /connection/:connectionid/layer/:layerid/task/invoke": {
"DELETE /task/raw/:task/version/:version": {
"body": false,
"query": false,
"res": true
},
"GET /connection/:connectionid/layer/:layerid/task/logs": {
"body": false,
"PATCH /task/:task": {
"body": true,
"query": false,
"res": true
},
"GET /connection/:connectionid/layer/:layerid/task/schema": {
"body": false,
"query": true,
"res": true
},
"POST /connection/:connectionid/layer/:layerid/task": {
"GET /task/:task/readme": {
"body": false,
"query": false,
"res": true
Expand Down Expand Up @@ -819,6 +839,11 @@
"query": true,
"res": true
},
"GET /user/:email": {
"body": false,
"query": false,
"res": true
},
"GET /video": {
"body": false,
"query": false,
Expand Down
4 changes: 2 additions & 2 deletions api/test/task.srv.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test('GET: api/task - empty', async (t) => {

t.deepEquals(res.body, {
total: 0,
items: {}
items: []
});
} catch (err) {
t.error(err, 'no error');
Expand Down Expand Up @@ -61,7 +61,7 @@ test('GET: api/task - empty', async (t) => {
});
});

const res = await flight.fetch('/api/task', {
const res = await flight.fetch('/api/task/raw', {
method: 'GET',
auth: {
bearer: flight.token.admin
Expand Down

0 comments on commit e7c7513

Please sign in to comment.