Skip to content

Commit

Permalink
Update requires protected access
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Oct 5, 2024
1 parent 6b9e42a commit 4250d68
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions functions/account/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { AccountType, accountAttributes, stripAccountInfo, type FullAccount } fr
import { setAccountAttribute, setDB } from '../../src/backend/api';
import type { RequestContext } from '../../src/backend/context';
import { checkAuth, checkBody, error, getAccountFromTokenOrID, parseError, response } from '../../src/backend/utils';
import { Access } from '../../src/generic';

export { onRequestOptions } from '../../src/backend/utils';

Expand Down Expand Up @@ -32,6 +33,7 @@ export async function onRequest({ env, request }: RequestContext): Promise<Respo
target,
allowIfSame: ['username', 'email'].includes(body.key),
requiredType: requiredTypeForChange[body.key],
access: Access.PROTECTED,
});

try {
Expand Down

0 comments on commit 4250d68

Please sign in to comment.