@projectinvicta/nails 3.0.9 → 3.0.11
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 +1 -1
- package/templates/default/bin/server.js +4 -4
- package/templates/default/server/controllers/users_controller.ts +1 -1
- package/templates/default/server/models/User.ts +6 -2
- package/tests/services/integration/server/models/dog.js +1 -1
- package/tests/services/integration/server/models/owner.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Nails from '@projectinvicta/nails';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import service_config from '../config/service.js';
|
|
3
|
+
import service_config from '../config/service.ts';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
const nails = new Nails(service_config);
|
|
6
|
+
await nails.startServer();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {Model, DataTypes} from "@projectinvicta/nails";
|
|
2
|
-
import Dog from "./Dog";
|
|
2
|
+
import Dog from "./Dog.ts";
|
|
3
3
|
|
|
4
4
|
export const schema = {
|
|
5
5
|
name: DataTypes.STRING,
|
|
@@ -9,6 +9,10 @@ export const schema = {
|
|
|
9
9
|
|
|
10
10
|
export default class User extends Model {};
|
|
11
11
|
|
|
12
|
-
export async function
|
|
12
|
+
export async function afterInitialize() {
|
|
13
|
+
// Add hooks here
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export async function afterInitializeAll() {
|
|
13
17
|
await User.hasMany(Dog);
|
|
14
18
|
}
|