diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-05-06 13:09:46 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-05-08 11:23:20 -0400 |
| commit | 7db03f61b1d37a4f61c7b8d4bfcd3c04966b8d7d (patch) | |
| tree | dcd7ecd322ce464084b746535d309af1a898cef2 /packages | |
| parent | improve type checks in POST /api/v1/apps endpoint (diff) | |
| download | sharkey-7db03f61b1d37a4f61c7b8d4bfcd3c04966b8d7d.tar.gz sharkey-7db03f61b1d37a4f61c7b8d4bfcd3c04966b8d7d.tar.bz2 sharkey-7db03f61b1d37a4f61c7b8d4bfcd3c04966b8d7d.zip | |
store OAuth "website" in POST /api/v1/apps
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/megalodon/src/misskey.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/megalodon/src/misskey.ts b/packages/megalodon/src/misskey.ts index cfca2c291c..669eb0f106 100644 --- a/packages/megalodon/src/misskey.ts +++ b/packages/megalodon/src/misskey.ts @@ -39,7 +39,7 @@ export default class Misskey implements MegalodonInterface { public async registerApp( client_name: string, - options: Partial<{ scopes: Array<string>; redirect_uri: string; website: string }> = { + options: Partial<{ scopes: Array<string>; redirect_uri: string; website?: string }> = { scopes: MisskeyAPI.DEFAULT_SCOPE, redirect_uri: this.baseUrl } @@ -62,13 +62,14 @@ export default class Misskey implements MegalodonInterface { */ public async createApp( client_name: string, - options: Partial<{ scopes: Array<string>; redirect_uri: string; website: string }> = { + options: Partial<{ scopes: Array<string>; redirect_uri: string; website?: string }> = { scopes: MisskeyAPI.DEFAULT_SCOPE, redirect_uri: this.baseUrl } ): Promise<OAuth.AppData> { const redirect_uri = options.redirect_uri || this.baseUrl const scopes = options.scopes || MisskeyAPI.DEFAULT_SCOPE + const website = options.website ?? ''; const params: { name: string @@ -77,7 +78,7 @@ export default class Misskey implements MegalodonInterface { callbackUrl: string } = { name: client_name, - description: '', + description: website, permission: scopes, callbackUrl: redirect_uri } |