Skip to content

Commit f30775b

Browse files
committed
Revert "Add declarations to context"
This reverts commit d67f823.
1 parent e5b740f commit f30775b

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/routes/openapi.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,20 @@ router.post("/openapi", (req, res) => {
1010
const {
1111
"x-nuc-action": action,
1212
"x-nuc-functions": functions = [],
13-
"x-nuc-declarations": declarations = [],
1413
"x-nuc-port": port,
1514
} = Joi.attempt(
1615
req.body,
1716
Joi.object({
1817
"x-nuc-action": Joi.string().required(),
1918
"x-nuc-functions": Joi.array().optional(),
20-
"x-nuc-declarations": Joi.array().optional(),
2119
"x-nuc-port": Joi.number().optional(),
2220
})
2321
.required()
2422
.options({ stripUnknown: true })
2523
);
2624

2725
if (action === "start") {
28-
context.run(
29-
functions.map(({ definition }) => ({
30-
definition,
31-
}))
32-
);
33-
context.run(
34-
declarations.map(({ definition }) => ({
35-
definition,
36-
options: { declarative: true },
37-
}))
38-
);
26+
context.run(functions);
3927

4028
openapi.init();
4129
openapi.load(req.body);

0 commit comments

Comments
 (0)