create-nattyjs 0.0.1-beta.39 → 0.0.1-beta.41
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.
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { anonymous } from '@nattyjs/core'
|
|
1
2
|
|
|
2
3
|
export class RequestsController {
|
|
3
4
|
|
|
@@ -7,6 +8,8 @@ export class RequestsController {
|
|
|
7
8
|
* // API Endpoint: GET /api/requests
|
|
8
9
|
* // Response: [{ name: 'NattyJS' }]
|
|
9
10
|
*/
|
|
11
|
+
|
|
12
|
+
@anonymous()
|
|
10
13
|
async get(): Promise<Array<Object>> {
|
|
11
14
|
return [{ name: 'NattyJS' }];
|
|
12
15
|
}
|
|
@@ -18,6 +21,8 @@ export class RequestsController {
|
|
|
18
21
|
* // Parameter: id = 1
|
|
19
22
|
* // Response: { name: 'NattyJS', id: 1 }
|
|
20
23
|
*/
|
|
24
|
+
|
|
25
|
+
@anonymous()
|
|
21
26
|
async getBy(id: number): Promise<Object> {
|
|
22
27
|
// In a real application, this would query a database for the item
|
|
23
28
|
// matching the provided ID.
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"build:prod": "natty build --mode prod"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@nattyjs/cli": "0.0.1-beta.
|
|
14
|
-
"@nattyjs/common": "0.0.1-beta.
|
|
15
|
-
"@nattyjs/core": "0.0.1-beta.
|
|
16
|
-
"@nattyjs/entity": "0.0.1-beta.
|
|
17
|
-
"@nattyjs/express": "0.0.1-beta.
|
|
18
|
-
"@nattyjs/orm": "0.0.1-beta.
|
|
19
|
-
"@nattyjs/types": "0.0.1-beta.
|
|
20
|
-
"@nattyjs/validation-decorators": "0.0.1-beta.
|
|
13
|
+
"@nattyjs/cli": "0.0.1-beta.41",
|
|
14
|
+
"@nattyjs/common": "0.0.1-beta.41",
|
|
15
|
+
"@nattyjs/core": "0.0.1-beta.41",
|
|
16
|
+
"@nattyjs/entity": "0.0.1-beta.41",
|
|
17
|
+
"@nattyjs/express": "0.0.1-beta.41",
|
|
18
|
+
"@nattyjs/orm": "0.0.1-beta.41",
|
|
19
|
+
"@nattyjs/types": "0.0.1-beta.41",
|
|
20
|
+
"@nattyjs/validation-decorators": "0.0.1-beta.41",
|
|
21
21
|
"mri": "^1.2.0",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
|
23
23
|
}
|