upd: update misskey support in megalodon

This commit is contained in:
Mar0xy 2023-09-24 14:44:55 +02:00
parent 1501ab261d
commit c85857f242
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
2 changed files with 3 additions and 3 deletions

View file

@ -1041,7 +1041,7 @@ export interface MegalodonInterface {
* *
* @return Array of lists. * @return Array of lists.
*/ */
getLists(): Promise<Response<Array<Entity.List>>> getLists(id: string): Promise<Response<Array<Entity.List>>>
/** /**
* Show a single list. * Show a single list.
* *

View file

@ -1714,9 +1714,9 @@ export default class Misskey implements MegalodonInterface {
/** /**
* POST /api/users/lists/list * POST /api/users/lists/list
*/ */
public async getLists(): Promise<Response<Array<Entity.List>>> { public async getLists(id: string): Promise<Response<Array<Entity.List>>> {
return this.client return this.client
.post<Array<MisskeyAPI.Entity.List>>('/api/users/lists/list') .post<Array<MisskeyAPI.Entity.List>>('/api/users/lists/list', { userId: id })
.then(res => ({ ...res, data: res.data.map(l => MisskeyAPI.Converter.list(l)) })) .then(res => ({ ...res, data: res.data.map(l => MisskeyAPI.Converter.list(l)) }))
} }