mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
minor fixes to /v1/accounts/verify_credentials
This commit is contained in:
parent
759e7f05c4
commit
f00a0fee45
1 changed files with 2 additions and 3 deletions
|
@ -35,15 +35,14 @@ export class ApiAccountMastodon {
|
||||||
|
|
||||||
public register(fastify: FastifyInstance, upload: ReturnType<typeof multer>): void {
|
public register(fastify: FastifyInstance, upload: ReturnType<typeof multer>): void {
|
||||||
fastify.get<ApiAccountMastodonRoute>('/v1/accounts/verify_credentials', async (_request, reply) => {
|
fastify.get<ApiAccountMastodonRoute>('/v1/accounts/verify_credentials', async (_request, reply) => {
|
||||||
const client = await this.clientService.getClient(_request);
|
const client = this.clientService.getClient(_request);
|
||||||
const data = await client.verifyAccountCredentials();
|
const data = await client.verifyAccountCredentials();
|
||||||
const acct = await this.mastoConverters.convertAccount(data.data);
|
const acct = await this.mastoConverters.convertAccount(data.data);
|
||||||
const response = Object.assign({}, acct, {
|
const response = Object.assign({}, acct, {
|
||||||
source: {
|
source: {
|
||||||
// TODO move these into the convertAccount logic directly
|
|
||||||
note: acct.note,
|
note: acct.note,
|
||||||
fields: acct.fields,
|
fields: acct.fields,
|
||||||
privacy: '',
|
privacy: 'public',
|
||||||
sensitive: false,
|
sensitive: false,
|
||||||
language: '',
|
language: '',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue