mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
chore: project
This commit is contained in:
@@ -253,4 +253,19 @@ export abstract class BaseService<T> {
|
||||
async findOne(options: FindOneOptions<T>) {
|
||||
return await this.getRepository().findOne(options);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export function checkUserProjectParam(userId: number, projectId: number) {
|
||||
if (projectId != null ){
|
||||
if( userId !==0) {
|
||||
throw new ValidateException('userId projectId 错误');
|
||||
}
|
||||
return true
|
||||
}else{
|
||||
if( userId > 0) {
|
||||
return true
|
||||
}
|
||||
throw new ValidateException('userId不能为空');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user