@hedhog/admin 0.0.50 → 0.0.52
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -12,7 +12,7 @@ export class Migrate implements MigrationInterface {
|
|
12
12
|
await queryRunner.manager
|
13
13
|
.createQueryBuilder()
|
14
14
|
.insert()
|
15
|
-
.into('role_routes')
|
15
|
+
.into('role_routes', ['role_id', 'route_id'])
|
16
16
|
.values({
|
17
17
|
role_id: 1,
|
18
18
|
route_id: route.id,
|
@@ -20,24 +20,10 @@ export class Migrate implements MigrationInterface {
|
|
20
20
|
.execute();
|
21
21
|
}
|
22
22
|
|
23
|
-
const adminAccessRoutes = [88, 1, 3];
|
24
|
-
|
25
|
-
for (const routeId of adminAccessRoutes) {
|
26
|
-
await queryRunner.manager
|
27
|
-
.createQueryBuilder()
|
28
|
-
.insert()
|
29
|
-
.into('role_routes')
|
30
|
-
.values({
|
31
|
-
role_id: 3,
|
32
|
-
route_id: routeId,
|
33
|
-
})
|
34
|
-
.execute();
|
35
|
-
}
|
36
|
-
|
37
23
|
await queryRunner.manager
|
38
24
|
.createQueryBuilder()
|
39
25
|
.insert()
|
40
|
-
.into('role_routes')
|
26
|
+
.into('role_routes', ['role_id', 'route_id'])
|
41
27
|
.values({
|
42
28
|
role_id: 2,
|
43
29
|
route_id: 3,
|
@@ -55,7 +41,7 @@ export class Migrate implements MigrationInterface {
|
|
55
41
|
await queryRunner.manager
|
56
42
|
.createQueryBuilder()
|
57
43
|
.insert()
|
58
|
-
.into('role_routes')
|
44
|
+
.into('role_routes', ['role_id', 'route_id'])
|
59
45
|
.values({
|
60
46
|
role_id: 2,
|
61
47
|
route_id: route.id,
|
@@ -252,6 +252,20 @@ export class Migrate implements MigrationInterface {
|
|
252
252
|
.execute();
|
253
253
|
}
|
254
254
|
}
|
255
|
+
|
256
|
+
const adminAccessRoutes = [88, 1, 3];
|
257
|
+
|
258
|
+
for (const routeId of adminAccessRoutes) {
|
259
|
+
await queryRunner.manager
|
260
|
+
.createQueryBuilder()
|
261
|
+
.insert()
|
262
|
+
.into('role_routes', ['role_id', 'route_id'])
|
263
|
+
.values({
|
264
|
+
role_id: 3,
|
265
|
+
route_id: routeId,
|
266
|
+
})
|
267
|
+
.execute();
|
268
|
+
}
|
255
269
|
}
|
256
270
|
|
257
271
|
public async down(queryRunner: QueryRunner): Promise<void> {
|