fix wrong API parameter in i/shared-access/login

This commit is contained in:
Hazelnoot 2025-06-21 13:38:18 -04:00
parent 49dad22609
commit 8955d05962

View file

@ -47,7 +47,7 @@ export const meta = {
export const paramDef = { export const paramDef = {
type: 'object', type: 'object',
properties: { properties: {
tokenId: { type: 'string' }, grantId: { type: 'string' },
}, },
required: ['grantId'], required: ['grantId'],
} as const; } as const;
@ -59,7 +59,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private readonly accessTokensRepository: AccessTokensRepository, private readonly accessTokensRepository: AccessTokensRepository,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const token = await this.accessTokensRepository.findOneBy({ id: ps.tokenId }); const token = await this.accessTokensRepository.findOneBy({ id: ps.grantId });
if (!token) { if (!token) {
throw new ApiError(meta.errors.noSuchAccess); throw new ApiError(meta.errors.noSuchAccess);