Return an error for POST /api/v1/accounts
This commit is contained in:
parent
b7ecc609de
commit
bdf8e9a61d
|
@ -5,6 +5,7 @@ import {
|
|||
accountLookupController,
|
||||
accountSearchController,
|
||||
accountStatusesController,
|
||||
createAccountController,
|
||||
relationshipsController,
|
||||
updateCredentialsController,
|
||||
verifyCredentialsController,
|
||||
|
@ -61,6 +62,7 @@ app.post('/oauth/revoke', emptyObjectController);
|
|||
app.post('/oauth/authorize', oauthAuthorizeController);
|
||||
app.get('/oauth/authorize', oauthController);
|
||||
|
||||
app.post('/api/v1/acccounts', createAccountController);
|
||||
app.get('/api/v1/accounts/verify_credentials', requireAuth, verifyCredentialsController);
|
||||
app.patch('/api/v1/accounts/update_credentials', requireAuth, updateCredentialsController);
|
||||
app.get('/api/v1/accounts/search', accountSearchController);
|
||||
|
|
|
@ -6,6 +6,10 @@ import { signEvent } from '@/sign.ts';
|
|||
import { toAccount, toStatus } from '@/transmute.ts';
|
||||
import { buildLinkHeader, eventDateComparator, lookupAccount, paginationSchema, parseBody } from '@/utils.ts';
|
||||
|
||||
const createAccountController: AppController = (c) => {
|
||||
return c.json({ error: 'Please log in with Nostr.' }, 405);
|
||||
};
|
||||
|
||||
const verifyCredentialsController: AppController = async (c) => {
|
||||
const pubkey = c.get('pubkey')!;
|
||||
|
||||
|
@ -172,6 +176,7 @@ export {
|
|||
accountLookupController,
|
||||
accountSearchController,
|
||||
accountStatusesController,
|
||||
createAccountController,
|
||||
relationshipsController,
|
||||
updateCredentialsController,
|
||||
verifyCredentialsController,
|
||||
|
|
Loading…
Reference in New Issue