mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 11:27:31 -07:00
[mastodon-client] Add additional fields to /v1/apps response
This is undocumented under https://docs.joinmastodon.org/entities/Application/ but some apps expect it anyway.
This commit is contained in:
parent
c46ea29ba3
commit
7b951f76ed
2 changed files with 6 additions and 2 deletions
|
@ -4,8 +4,10 @@
|
||||||
**/
|
**/
|
||||||
namespace OAuth {
|
namespace OAuth {
|
||||||
export type Application = {
|
export type Application = {
|
||||||
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
website: string | null;
|
website: string | null;
|
||||||
|
redirect_uri: string;
|
||||||
vapid_key: string | undefined;
|
vapid_key: string | undefined;
|
||||||
client_id: string;
|
client_id: string;
|
||||||
client_secret: string;
|
client_secret: string;
|
||||||
|
|
|
@ -37,11 +37,13 @@ export class AuthHelpers {
|
||||||
}).then((x) => OAuthApps.findOneByOrFail(x.identifiers[0]));
|
}).then((x) => OAuthApps.findOneByOrFail(x.identifiers[0]));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
id: app.id,
|
||||||
name: app.name,
|
name: app.name,
|
||||||
website: website,
|
website: app.website,
|
||||||
|
redirect_uri: app.redirectUris.join('\n'),
|
||||||
client_id: app.clientId,
|
client_id: app.clientId,
|
||||||
client_secret: app.clientSecret,
|
client_secret: app.clientSecret,
|
||||||
vapid_key: await fetchMeta().then(meta => meta.swPublicKey ?? undefined),
|
vapid_key: await fetchMeta().then(meta => meta.swPublicKey),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue