refactor(backend): exist -> exists (#13203)
* refactor(backend): exist -> exists * fix
This commit is contained in:
@@ -34,7 +34,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
) {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
if (ps.tokenId) {
|
||||
const tokenExist = await this.accessTokensRepository.exist({ where: { id: ps.tokenId } });
|
||||
const tokenExist = await this.accessTokensRepository.exists({ where: { id: ps.tokenId } });
|
||||
|
||||
if (tokenExist) {
|
||||
await this.accessTokensRepository.delete({
|
||||
@@ -43,7 +43,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||
});
|
||||
}
|
||||
} else if (ps.token) {
|
||||
const tokenExist = await this.accessTokensRepository.exist({ where: { token: ps.token } });
|
||||
const tokenExist = await this.accessTokensRepository.exists({ where: { token: ps.token } });
|
||||
|
||||
if (tokenExist) {
|
||||
await this.accessTokensRepository.delete({
|
||||
|
Reference in New Issue
Block a user