refactor(backend): exist -> exists (#13203)
* refactor(backend): exist -> exists * fix
This commit is contained in:
parent
90b633b5a6
commit
0f7918c51b
40 changed files with 64 additions and 64 deletions
|
@ -71,7 +71,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
private downloadService: DownloadService,
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const userExist = await this.usersRepository.exist({ where: { id: me.id } });
|
||||
const userExist = await this.usersRepository.exists({ where: { id: me.id } });
|
||||
if (!userExist) throw new ApiError(meta.errors.noSuchUser);
|
||||
const file = await this.driveFilesRepository.findOneBy({ id: ps.fileId });
|
||||
if (file === null) throw new ApiError(meta.errors.noSuchFile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue