mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-06 20:16:57 +00:00
store OAuth "website" in POST /api/v1/apps
This commit is contained in:
parent
7cd181df71
commit
7db03f61b1
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue