Skip to content

Commit b06e2d9

Browse files
committed
wip: alkt
1 parent 2df7655 commit b06e2d9

File tree

3 files changed

+310
-0
lines changed

3 files changed

+310
-0
lines changed

custom/src/modules/alkt/v1/module.js

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import Joi from 'joi';
2+
import got from 'got';
3+
4+
const module = {
5+
name: 'alkt',
6+
routes: [
7+
{
8+
method: 'GET',
9+
path: '/alkt/servingstaff/{objectId}',
10+
options: {
11+
description: 'Get serving staff from AlkT for specified object',
12+
tags: ['api', 'alkt'],
13+
validate: {
14+
params: Joi.object({
15+
objectId: Joi.number().integer(),
16+
}),
17+
},
18+
},
19+
handler: async (req, res) => {
20+
const { data } = await got
21+
.get(`${servingstaffUrl}?objectId=${req.params.objectId}`)
22+
.json();
23+
return res.status(200).send(data);
24+
},
25+
},
26+
],
27+
};
28+
29+
export { module };

custom/src/modules/alkt/v1/package-lock.json

+273
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "AlkT module",
3+
"description": "Integration to Sokigo AlkT",
4+
"type": "module",
5+
"dependencies": {
6+
"got": "^14.3.0"
7+
}
8+
}

0 commit comments

Comments
 (0)