mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-22 16:26:18 +08:00
added endpoint to update inbox
This commit is contained in:
parent
a28ac81b2e
commit
7b18a44512
|
@ -194,6 +194,17 @@ export default class Users {
|
|||
}
|
||||
|
||||
async getInbox(): Promise<Ape.EndpointData> {
|
||||
return await this.httpClient.patch(`${BASE_PATH}/inbox`);
|
||||
return await this.httpClient.get(`${BASE_PATH}/inbox`);
|
||||
}
|
||||
|
||||
async updateInbox(options: {
|
||||
mailIdsToDelete?: string[];
|
||||
mailIdsToMarkRead?: string[];
|
||||
}): Promise<Ape.EndpointData> {
|
||||
const payload = {
|
||||
mailIdsToDelete: options.mailIdsToDelete,
|
||||
mailIdsToMarkRead: options.mailIdsToMarkRead,
|
||||
};
|
||||
return await this.httpClient.patch(`${BASE_PATH}/inbox`, { payload });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue