diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-02-28 09:34:21 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-02-28 09:34:21 +0900 |
| commit | c63c3462dd00e7de3f40b15ad43993a26734263f (patch) | |
| tree | 959d9b753059e66e813ab3b8fe74e4975acbc32d /packages/backend/src/server/api/AuthenticateService.ts | |
| parent | [skip ci] Update CHANGELOG.md (prepend template) (diff) | |
| download | sharkey-c63c3462dd00e7de3f40b15ad43993a26734263f.tar.gz sharkey-c63c3462dd00e7de3f40b15ad43993a26734263f.tar.bz2 sharkey-c63c3462dd00e7de3f40b15ad43993a26734263f.zip | |
refactor
Diffstat (limited to 'packages/backend/src/server/api/AuthenticateService.ts')
| -rw-r--r-- | packages/backend/src/server/api/AuthenticateService.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/server/api/AuthenticateService.ts b/packages/backend/src/server/api/AuthenticateService.ts index 690ff2e022..601618553e 100644 --- a/packages/backend/src/server/api/AuthenticateService.ts +++ b/packages/backend/src/server/api/AuthenticateService.ts @@ -11,7 +11,7 @@ import type { MiAccessToken } from '@/models/AccessToken.js'; import { MemoryKVCache } from '@/misc/cache.js'; import type { MiApp } from '@/models/App.js'; import { CacheService } from '@/core/CacheService.js'; -import isNativeToken from '@/misc/is-native-token.js'; +import { isNativeUserToken } from '@/misc/token.js'; import { bindThis } from '@/decorators.js'; export class AuthenticationError extends Error { @@ -46,7 +46,7 @@ export class AuthenticateService implements OnApplicationShutdown { return [null, null]; } - if (isNativeToken(token)) { + if (isNativeUserToken(token)) { const user = await this.cacheService.localUserByNativeTokenCache.fetch(token, () => this.usersRepository.findOneBy({ token }) as Promise<MiLocalUser | null>); |