mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 04:26:58 +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(
|
public async registerApp(
|
||||||
client_name: string,
|
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,
|
scopes: MisskeyAPI.DEFAULT_SCOPE,
|
||||||
redirect_uri: this.baseUrl
|
redirect_uri: this.baseUrl
|
||||||
}
|
}
|
||||||
|
@ -62,13 +62,14 @@ export default class Misskey implements MegalodonInterface {
|
||||||
*/
|
*/
|
||||||
public async createApp(
|
public async createApp(
|
||||||
client_name: string,
|
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,
|
scopes: MisskeyAPI.DEFAULT_SCOPE,
|
||||||
redirect_uri: this.baseUrl
|
redirect_uri: this.baseUrl
|
||||||
}
|
}
|
||||||
): Promise<OAuth.AppData> {
|
): Promise<OAuth.AppData> {
|
||||||
const redirect_uri = options.redirect_uri || this.baseUrl
|
const redirect_uri = options.redirect_uri || this.baseUrl
|
||||||
const scopes = options.scopes || MisskeyAPI.DEFAULT_SCOPE
|
const scopes = options.scopes || MisskeyAPI.DEFAULT_SCOPE
|
||||||
|
const website = options.website ?? '';
|
||||||
|
|
||||||
const params: {
|
const params: {
|
||||||
name: string
|
name: string
|
||||||
|
@ -77,7 +78,7 @@ export default class Misskey implements MegalodonInterface {
|
||||||
callbackUrl: string
|
callbackUrl: string
|
||||||
} = {
|
} = {
|
||||||
name: client_name,
|
name: client_name,
|
||||||
description: '',
|
description: website,
|
||||||
permission: scopes,
|
permission: scopes,
|
||||||
callbackUrl: redirect_uri
|
callbackUrl: redirect_uri
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue