chore: format

This commit is contained in:
xiaojunnuo
2026-05-31 01:41:33 +08:00
parent acd440106b
commit 4b57a0d729
557 changed files with 12530 additions and 14039 deletions
@@ -1,5 +1,5 @@
import { ALL, Body, Controller, Inject, Post, Provide } from '@midwayjs/core';
import { BaseController, PlusService, SysInstallInfo, SysSettingsService } from '@certd/lib-server';
import { ALL, Body, Controller, Inject, Post, Provide } from "@midwayjs/core";
import { BaseController, PlusService, SysInstallInfo, SysSettingsService } from "@certd/lib-server";
export type PreBindUserReq = {
userId: number;
@@ -10,7 +10,7 @@ export type BindUserReq = {
/**
*/
@Provide()
@Controller('/api/sys/account')
@Controller("/api/sys/account")
export class BasicController extends BaseController {
@Inject()
plusService: PlusService;
@@ -18,7 +18,7 @@ export class BasicController extends BaseController {
@Inject()
sysSettingsService: SysSettingsService;
@Post('/preBindUser', { description: 'sys:settings:edit' })
@Post("/preBindUser", { description: "sys:settings:edit" })
public async preBindUser(@Body(ALL) body: PreBindUserReq) {
// 设置缓存内容
if (body.userId == null || body.userId <= 0) {
@@ -28,7 +28,7 @@ export class BasicController extends BaseController {
return this.ok({});
}
@Post('/bindUser', { description: 'sys:settings:edit' })
@Post("/bindUser", { description: "sys:settings:edit" })
public async bindUser(@Body(ALL) body: BindUserReq) {
if (body.userId == null || body.userId <= 0) {
throw new Error("用户ID不能为空");
@@ -39,7 +39,7 @@ export class BasicController extends BaseController {
return this.ok({});
}
@Post('/unbindUser', { description: 'sys:settings:edit' })
@Post("/unbindUser", { description: "sys:settings:edit" })
public async unbindUser() {
const installInfo: SysInstallInfo = await this.sysSettingsService.getSetting(SysInstallInfo);
installInfo.bindUserId = null;
@@ -47,7 +47,7 @@ export class BasicController extends BaseController {
return this.ok({});
}
@Post('/updateLicense', { description: 'sys:settings:edit' })
@Post("/updateLicense", { description: "sys:settings:edit" })
public async updateLicense(@Body(ALL) body: { license: string }) {
await this.plusService.updateLicense(body.license);
return this.ok(true);