mirror of
https://github.com/certd/certd.git
synced 2026-05-16 05:07:32 +08:00
feat: 升级midway,支持esm
This commit is contained in:
@@ -1,14 +1,7 @@
|
||||
import {
|
||||
ALL,
|
||||
Body,
|
||||
Controller,
|
||||
Inject,
|
||||
Post,
|
||||
Provide,
|
||||
} from '@midwayjs/decorator';
|
||||
import { BaseController } from '../../../basic/base-controller';
|
||||
import { Constants } from '../../../basic/constants';
|
||||
import { UserService } from '../../authority/service/user-service';
|
||||
import { ALL, Body, Controller, Inject, Post, Provide } from '@midwayjs/core';
|
||||
import { BaseController } from '../../../basic/base-controller.js';
|
||||
import { Constants } from '../../../basic/constants.js';
|
||||
import { UserService } from '../../authority/service/user-service.js';
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
import { ALL, Body, Controller, Inject, Post, Provide, Query } from "@midwayjs/decorator";
|
||||
import { CrudController } from "../../../basic/crud-controller";
|
||||
import { Constants } from "../../../basic/constants";
|
||||
import { UserSettingsService } from "../service/user-settings-service";
|
||||
import { UserSettingsEntity } from "../entity/user-settings";
|
||||
import {
|
||||
ALL,
|
||||
Body,
|
||||
Controller,
|
||||
Inject,
|
||||
Post,
|
||||
Provide,
|
||||
Query,
|
||||
} from '@midwayjs/core';
|
||||
import { CrudController } from '../../../basic/crud-controller.js';
|
||||
import { Constants } from '../../../basic/constants.js';
|
||||
import { UserSettingsService } from '../service/user-settings-service.js';
|
||||
import { UserSettingsEntity } from '../entity/user-settings.js';
|
||||
|
||||
/**
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Provide, Scope, ScopeEnum } from '@midwayjs/decorator';
|
||||
import { Provide, Scope, ScopeEnum } from '@midwayjs/core';
|
||||
import { InjectEntityModel } from '@midwayjs/typeorm';
|
||||
import { Repository } from 'typeorm';
|
||||
import { BaseService } from '../../../basic/base-service';
|
||||
import { UserSettingsEntity } from '../entity/user-settings';
|
||||
import { BaseService } from '../../../basic/base-service.js';
|
||||
import { UserSettingsEntity } from '../entity/user-settings.js';
|
||||
|
||||
/**
|
||||
* 授权
|
||||
@@ -30,7 +30,10 @@ export class UserSettingsService extends BaseService<UserSettingsEntity> {
|
||||
};
|
||||
}
|
||||
|
||||
async getByKey(key: string, userId: number): Promise<UserSettingsEntity | null> {
|
||||
async getByKey(
|
||||
key: string,
|
||||
userId: number
|
||||
): Promise<UserSettingsEntity | null> {
|
||||
if (!key || !userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user