@hedhog/admin 0.0.91 → 0.0.93
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/setting/dto/settings.dto.d.ts +9 -0
- package/dist/setting/dto/settings.dto.d.ts.map +1 -0
- package/dist/setting/dto/settings.dto.js +34 -0
- package/dist/setting/dto/settings.dto.js.map +1 -0
- package/dist/setting/settings.controller.d.ts +2 -0
- package/dist/setting/settings.controller.d.ts.map +1 -1
- package/dist/setting/settings.controller.js +12 -0
- package/dist/setting/settings.controller.js.map +1 -1
- package/dist/setting/settings.service.d.ts +3 -1
- package/dist/setting/settings.service.d.ts.map +1 -1
- package/dist/setting/settings.service.js +27 -1
- package/dist/setting/settings.service.js.map +1 -1
- package/hedhog.yaml +12 -16
- package/package.json +1 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"settings.dto.d.ts","sourceRoot":"","sources":["../../../src/setting/dto/settings.dto.ts"],"names":[],"mappings":"AAGA,cAAM,OAAO;IAEX,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,WAAW;IAItB,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.SettingsDTO = void 0;
|
13
|
+
const class_validator_1 = require("class-validator");
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
15
|
+
class Setting {
|
16
|
+
}
|
17
|
+
__decorate([
|
18
|
+
(0, class_validator_1.IsString)(),
|
19
|
+
__metadata("design:type", String)
|
20
|
+
], Setting.prototype, "slug", void 0);
|
21
|
+
__decorate([
|
22
|
+
(0, class_validator_1.IsString)(),
|
23
|
+
__metadata("design:type", String)
|
24
|
+
], Setting.prototype, "value", void 0);
|
25
|
+
class SettingsDTO {
|
26
|
+
}
|
27
|
+
exports.SettingsDTO = SettingsDTO;
|
28
|
+
__decorate([
|
29
|
+
(0, class_validator_1.IsArray)(),
|
30
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
31
|
+
(0, class_transformer_1.Type)(() => Setting),
|
32
|
+
__metadata("design:type", Array)
|
33
|
+
], SettingsDTO.prototype, "settings", void 0);
|
34
|
+
//# sourceMappingURL=settings.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"settings.dto.js","sourceRoot":"","sources":["../../../src/setting/dto/settings.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAoE;AACpE,yDAAyC;AAEzC,MAAM,OAAO;CAMZ;AAJC;IADC,IAAA,0BAAQ,GAAE;;qCACE;AAGb;IADC,IAAA,0BAAQ,GAAE;;sCACG;AAGhB,MAAa,WAAW;CAKvB;AALD,kCAKC;AADC;IAHC,IAAA,yBAAO,GAAE;IACT,IAAA,gCAAc,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,OAAO,CAAC;;6CACA"}
|
@@ -2,6 +2,7 @@ import { CreateDTO } from './dto/create.dto';
|
|
2
2
|
import { DeleteDTO } from '../dto/delete.dto';
|
3
3
|
import { UpdateDTO } from './dto/update.dto';
|
4
4
|
import { SettingsService } from './settings.service';
|
5
|
+
import { SettingsDTO } from './dto/settings.dto';
|
5
6
|
export declare class SettingsController {
|
6
7
|
private readonly settingsService;
|
7
8
|
constructor(settingsService: SettingsService);
|
@@ -11,6 +12,7 @@ export declare class SettingsController {
|
|
11
12
|
show(settingId: number): Promise<any>;
|
12
13
|
create(data: CreateDTO): Promise<any>;
|
13
14
|
updateFromSlug(slug: string, data: UpdateDTO): Promise<any>;
|
15
|
+
setManySettings(data: SettingsDTO): Promise<any[]>;
|
14
16
|
update(settingId: number, data: UpdateDTO): Promise<any>;
|
15
17
|
delete(data: DeleteDTO): Promise<any>;
|
16
18
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.controller.d.ts","sourceRoot":"","sources":["../../src/setting/settings.controller.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"settings.controller.d.ts","sourceRoot":"","sources":["../../src/setting/settings.controller.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,qBAEa,kBAAkB;IAG3B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,eAAe;IAK7C,mBAAmB,CACT,gBAAgB,KAAA,EACpB,MAAM,KAAA,EACD,IAAI,EAAE,MAAM;IAWvB,gBAAgB,CAAe,gBAAgB,KAAA,EAAY,MAAM,KAAA;IAMjE,WAAW,CAAe,gBAAgB,KAAA,EAAY,MAAM,KAAA;IAM5D,IAAI,CAAmC,SAAS,EAAE,MAAM;IAM9D,MAAM,CAAS,IAAI,EAAE,SAAS;IAMxB,cAAc,CAAgB,IAAI,EAAE,MAAM,EAAU,IAAI,EAAE,SAAS;IAMnE,eAAe,CAAS,IAAI,EAAE,WAAW;IAMzC,MAAM,CACwB,SAAS,EAAE,MAAM,EAC3C,IAAI,EAAE,SAAS;IAUnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
|
@@ -22,6 +22,7 @@ const delete_dto_1 = require("../dto/delete.dto");
|
|
22
22
|
const update_dto_1 = require("./dto/update.dto");
|
23
23
|
const settings_service_1 = require("./settings.service");
|
24
24
|
const locale_1 = require("../locale");
|
25
|
+
const settings_dto_1 = require("./dto/settings.dto");
|
25
26
|
let SettingsController = class SettingsController {
|
26
27
|
constructor(settingsService) {
|
27
28
|
this.settingsService = settingsService;
|
@@ -44,6 +45,9 @@ let SettingsController = class SettingsController {
|
|
44
45
|
async updateFromSlug(slug, data) {
|
45
46
|
return this.settingsService.updateFromSlug(slug, data);
|
46
47
|
}
|
48
|
+
async setManySettings(data) {
|
49
|
+
return this.settingsService.setManySettings(data);
|
50
|
+
}
|
47
51
|
async update(settingId, data) {
|
48
52
|
return this.settingsService.update({
|
49
53
|
id: settingId,
|
@@ -108,6 +112,14 @@ __decorate([
|
|
108
112
|
__metadata("design:paramtypes", [String, update_dto_1.UpdateDTO]),
|
109
113
|
__metadata("design:returntype", Promise)
|
110
114
|
], SettingsController.prototype, "updateFromSlug", null);
|
115
|
+
__decorate([
|
116
|
+
(0, common_1.UseGuards)(auth_guard_1.AuthGuard),
|
117
|
+
(0, common_1.Put)(),
|
118
|
+
__param(0, (0, common_1.Body)()),
|
119
|
+
__metadata("design:type", Function),
|
120
|
+
__metadata("design:paramtypes", [settings_dto_1.SettingsDTO]),
|
121
|
+
__metadata("design:returntype", Promise)
|
122
|
+
], SettingsController.prototype, "setManySettings", null);
|
111
123
|
__decorate([
|
112
124
|
(0, common_1.UseGuards)(auth_guard_1.AuthGuard),
|
113
125
|
(0, common_1.Patch)(':settingId'),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.controller.js","sourceRoot":"","sources":["../../src/setting/settings.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAawB;AACxB,0DAAsD;AACtD,sEAAyD;AACzD,iDAA6C;AAC7C,kDAA8C;AAC9C,iDAA6C;AAC7C,yDAAqD;AACrD,sCAAmC;
|
1
|
+
{"version":3,"file":"settings.controller.js","sourceRoot":"","sources":["../../src/setting/settings.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAawB;AACxB,0DAAsD;AACtD,sEAAyD;AACzD,iDAA6C;AAC7C,kDAA8C;AAC9C,iDAA6C;AAC7C,yDAAqD;AACrD,sCAAmC;AACnC,qDAAiD;AAI1C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,YAEmB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAChD,CAAC;IAIE,AAAN,KAAK,CAAC,mBAAmB,CACT,gBAAgB,EACpB,MAAM,EACD,IAAY;QAE3B,OAAO,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAC7C,MAAM,EACN,gBAAgB,EAChB,IAAI,CACL,CAAC;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,gBAAgB,CAAe,gBAAgB,EAAY,MAAM;QACrE,OAAO,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACzE,CAAC;IAIK,AAAN,KAAK,CAAC,WAAW,CAAe,gBAAgB,EAAY,MAAM;QAChE,OAAO,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACpE,CAAC;IAIK,AAAN,KAAK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B,CAyE9B"}
|
@@ -3,10 +3,12 @@ import { PrismaService } from '@hedhog/prisma';
|
|
3
3
|
import { CreateDTO } from './dto/create.dto';
|
4
4
|
import { DeleteDTO } from '../dto/delete.dto';
|
5
5
|
import { UpdateDTO } from './dto/update.dto';
|
6
|
+
import { SettingsDTO } from './dto/settings.dto';
|
6
7
|
export declare class SettingsService {
|
7
8
|
private readonly prismaService;
|
8
9
|
private readonly paginationService;
|
9
10
|
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
11
|
+
setManySettings(data: SettingsDTO): Promise<any[]>;
|
10
12
|
getSettingFromGroup(locale: any, paginationParams: any, slug: string): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
11
13
|
getSettingGroups(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
12
14
|
getSettings(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
@@ -18,7 +20,7 @@ export declare class SettingsService {
|
|
18
20
|
}): Promise<any>;
|
19
21
|
updateFromSlug(slug: string, data: UpdateDTO): Promise<any>;
|
20
22
|
delete({ ids }: DeleteDTO): Promise<any>;
|
21
|
-
setSettingUserValue(slug: string, value: string): Promise<any>;
|
23
|
+
setSettingUserValue(user_id: number, slug: string, value: string): Promise<any>;
|
22
24
|
getSettingValues(slug: string | string[]): Promise<any>;
|
23
25
|
}
|
24
26
|
//# sourceMappingURL=settings.service.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.service.d.ts","sourceRoot":"","sources":["../../src/setting/settings.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;A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,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IA0ChE,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE;CA4C/C"}
|
@@ -22,6 +22,20 @@ let SettingsService = class SettingsService {
|
|
22
22
|
this.prismaService = prismaService;
|
23
23
|
this.paginationService = paginationService;
|
24
24
|
}
|
25
|
+
async setManySettings(data) {
|
26
|
+
const results = [];
|
27
|
+
for (const { slug, value } of data.settings) {
|
28
|
+
results.push(await this.prismaService.settings.update({
|
29
|
+
where: {
|
30
|
+
slug,
|
31
|
+
},
|
32
|
+
data: {
|
33
|
+
value,
|
34
|
+
},
|
35
|
+
}));
|
36
|
+
}
|
37
|
+
return results;
|
38
|
+
}
|
25
39
|
async getSettingFromGroup(locale, paginationParams, slug) {
|
26
40
|
const fields = ['slug', 'value'];
|
27
41
|
paginationParams.pageSize = 100;
|
@@ -178,7 +192,18 @@ let SettingsService = class SettingsService {
|
|
178
192
|
},
|
179
193
|
});
|
180
194
|
}
|
181
|
-
async setSettingUserValue(slug, value) {
|
195
|
+
async setSettingUserValue(user_id, slug, value) {
|
196
|
+
const user = await this.prismaService.users.findUnique({
|
197
|
+
where: {
|
198
|
+
id: user_id,
|
199
|
+
},
|
200
|
+
select: {
|
201
|
+
id: true,
|
202
|
+
},
|
203
|
+
});
|
204
|
+
if (!user) {
|
205
|
+
throw new common_1.BadRequestException(`User with id ${user_id} not found.`);
|
206
|
+
}
|
182
207
|
const setting = await this.prismaService.settings.findFirst({
|
183
208
|
where: {
|
184
209
|
slug,
|
@@ -195,6 +220,7 @@ let SettingsService = class SettingsService {
|
|
195
220
|
create: {
|
196
221
|
settingId: setting.id,
|
197
222
|
value,
|
223
|
+
user_id: user.id,
|
198
224
|
},
|
199
225
|
update: {
|
200
226
|
value,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"settings.service.js","sourceRoot":"","sources":["../../src/setting/settings.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAs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C,8BAAiB,CAAC,CAAC,CAAA;qCADZ,sBAAa;QAET,8BAAiB;GAL5C,eAAe,CAqU3B"}
|
package/hedhog.yaml
CHANGED
@@ -96,6 +96,8 @@ data:
|
|
96
96
|
method: GET
|
97
97
|
- url: /settings
|
98
98
|
method: POST
|
99
|
+
- url: /settings
|
100
|
+
method: PUT
|
99
101
|
- url: /settings/:slug
|
100
102
|
method: PUT
|
101
103
|
- url: /settings/:settingId
|
@@ -116,6 +118,16 @@ data:
|
|
116
118
|
method: PATCH
|
117
119
|
- url: /users
|
118
120
|
method: DELETE
|
121
|
+
- url: /locales
|
122
|
+
method: GET
|
123
|
+
- url: /locales/:localeId
|
124
|
+
method: GET
|
125
|
+
- url: /locales
|
126
|
+
method: POST
|
127
|
+
- url: /locales/:localeId
|
128
|
+
method: PATCH
|
129
|
+
- url: /locales
|
130
|
+
method: DELETE
|
119
131
|
menus:
|
120
132
|
- url: /
|
121
133
|
icon: dashboard
|
@@ -1262,7 +1274,6 @@ tables:
|
|
1262
1274
|
- type: created_at
|
1263
1275
|
- type: updated_at
|
1264
1276
|
ifNotExists: true
|
1265
|
-
|
1266
1277
|
country_translations:
|
1267
1278
|
columns:
|
1268
1279
|
- name: country_id
|
@@ -1283,7 +1294,6 @@ tables:
|
|
1283
1294
|
- type: created_at
|
1284
1295
|
- type: updated_at
|
1285
1296
|
ifNotExists: true
|
1286
|
-
|
1287
1297
|
translation_namespaces:
|
1288
1298
|
columns:
|
1289
1299
|
- type: pk
|
@@ -1291,7 +1301,6 @@ tables:
|
|
1291
1301
|
- type: created_at
|
1292
1302
|
- type: updated_at
|
1293
1303
|
ifNotExists: true
|
1294
|
-
|
1295
1304
|
translations:
|
1296
1305
|
columns:
|
1297
1306
|
- type: pk
|
@@ -1318,7 +1327,6 @@ tables:
|
|
1318
1327
|
- name
|
1319
1328
|
isUnique: true
|
1320
1329
|
ifNotExists: true
|
1321
|
-
|
1322
1330
|
multifactors:
|
1323
1331
|
columns:
|
1324
1332
|
- type: pk
|
@@ -1326,7 +1334,6 @@ tables:
|
|
1326
1334
|
- type: created_at
|
1327
1335
|
- type: updated_at
|
1328
1336
|
ifNotExists: true
|
1329
|
-
|
1330
1337
|
multifactor_translations:
|
1331
1338
|
columns:
|
1332
1339
|
- name: multifactor_id
|
@@ -1347,7 +1354,6 @@ tables:
|
|
1347
1354
|
- type: created_at
|
1348
1355
|
- type: updated_at
|
1349
1356
|
ifNotExists: true
|
1350
|
-
|
1351
1357
|
users:
|
1352
1358
|
columns:
|
1353
1359
|
- type: pk
|
@@ -1366,7 +1372,6 @@ tables:
|
|
1366
1372
|
- type: created_at
|
1367
1373
|
- type: updated_at
|
1368
1374
|
ifNotExists: true
|
1369
|
-
|
1370
1375
|
screens:
|
1371
1376
|
columns:
|
1372
1377
|
- type: pk
|
@@ -1376,7 +1381,6 @@ tables:
|
|
1376
1381
|
- type: created_at
|
1377
1382
|
- type: updated_at
|
1378
1383
|
ifNotExists: true
|
1379
|
-
|
1380
1384
|
screen_translations:
|
1381
1385
|
columns:
|
1382
1386
|
- name: screen_id
|
@@ -1398,7 +1402,6 @@ tables:
|
|
1398
1402
|
- type: created_at
|
1399
1403
|
- type: updated_at
|
1400
1404
|
ifNotExists: true
|
1401
|
-
|
1402
1405
|
menus:
|
1403
1406
|
columns:
|
1404
1407
|
- type: pk
|
@@ -1418,7 +1421,6 @@ tables:
|
|
1418
1421
|
- type: created_at
|
1419
1422
|
- type: updated_at
|
1420
1423
|
ifNotExists: true
|
1421
|
-
|
1422
1424
|
menu_translations:
|
1423
1425
|
columns:
|
1424
1426
|
- name: menu_id
|
@@ -1439,7 +1441,6 @@ tables:
|
|
1439
1441
|
- type: created_at
|
1440
1442
|
- type: updated_at
|
1441
1443
|
ifNotExists: true
|
1442
|
-
|
1443
1444
|
menu_screens:
|
1444
1445
|
columns:
|
1445
1446
|
- name: menu_id
|
@@ -1457,7 +1458,6 @@ tables:
|
|
1457
1458
|
column: id
|
1458
1459
|
onDelete: CASCADE
|
1459
1460
|
ifNotExists: true
|
1460
|
-
|
1461
1461
|
routes:
|
1462
1462
|
columns:
|
1463
1463
|
- type: pk
|
@@ -1478,7 +1478,6 @@ tables:
|
|
1478
1478
|
- columns: ['url', 'method']
|
1479
1479
|
isUnique: true
|
1480
1480
|
ifNotExists: true
|
1481
|
-
|
1482
1481
|
roles:
|
1483
1482
|
columns:
|
1484
1483
|
- type: pk
|
@@ -1486,7 +1485,6 @@ tables:
|
|
1486
1485
|
- type: created_at
|
1487
1486
|
- type: updated_at
|
1488
1487
|
ifNotExists: true
|
1489
|
-
|
1490
1488
|
role_translations:
|
1491
1489
|
columns:
|
1492
1490
|
- name: role_id
|
@@ -1508,7 +1506,6 @@ tables:
|
|
1508
1506
|
- type: created_at
|
1509
1507
|
- type: updated_at
|
1510
1508
|
ifNotExists: true
|
1511
|
-
|
1512
1509
|
role_menus:
|
1513
1510
|
columns:
|
1514
1511
|
- name: role_id
|
@@ -1528,7 +1525,6 @@ tables:
|
|
1528
1525
|
- type: created_at
|
1529
1526
|
- type: updated_at
|
1530
1527
|
ifNotExists: true
|
1531
|
-
|
1532
1528
|
route_screens:
|
1533
1529
|
columns:
|
1534
1530
|
- name: route_id
|