create-zuplo-api 6.62.7 → 6.62.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
-
"operationId": "
|
|
52
|
+
"operationId": "get-all-todos",
|
|
53
53
|
"x-zuplo-route": {
|
|
54
54
|
"corsPolicy": "none",
|
|
55
55
|
"handler": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"description": "Invalid request body"
|
|
102
102
|
}
|
|
103
103
|
},
|
|
104
|
-
"operationId": "
|
|
104
|
+
"operationId": "create-todo",
|
|
105
105
|
"x-zuplo-route": {
|
|
106
106
|
"corsPolicy": "none",
|
|
107
107
|
"handler": {
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
"description": "Todo not found"
|
|
170
170
|
}
|
|
171
171
|
},
|
|
172
|
-
"operationId": "
|
|
172
|
+
"operationId": "update-todo",
|
|
173
173
|
"x-zuplo-route": {
|
|
174
174
|
"corsPolicy": "none",
|
|
175
175
|
"handler": {
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
"description": "Todo not found"
|
|
205
205
|
}
|
|
206
206
|
},
|
|
207
|
-
"operationId": "
|
|
207
|
+
"operationId": "delete-todo",
|
|
208
208
|
"x-zuplo-route": {
|
|
209
209
|
"corsPolicy": "none",
|
|
210
210
|
"handler": {
|
|
@@ -12,7 +12,7 @@ export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
|
12
12
|
* return the content of a fetch. Try it by
|
|
13
13
|
* uncommenting the line below.
|
|
14
14
|
*/
|
|
15
|
-
// return fetch('
|
|
15
|
+
// return fetch('https://www.example.com/');
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* In this example, we're just going to return some content.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ZuploContext, ZuploRequest } from "@zuplo/runtime";
|
|
2
|
+
|
|
3
|
+
export default async function (request: ZuploRequest, context: ZuploContext) {
|
|
4
|
+
/**
|
|
5
|
+
* Use the log property on context to enjoy
|
|
6
|
+
* logging magic when testing your API.
|
|
7
|
+
*/
|
|
8
|
+
context.log.info(`Hi, from inside your zup!`);
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* If you want to proxy an API, you can simply
|
|
12
|
+
* return the content of a fetch. Try it by
|
|
13
|
+
* uncommenting the line below.
|
|
14
|
+
*/
|
|
15
|
+
// return fetch('https://www.example.com/');
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* In this example, we're just going to return some content.
|
|
19
|
+
*/
|
|
20
|
+
return "What zup?";
|
|
21
|
+
}
|