Skip to content

Commit

Permalink
fix: Map app.verifyCredentials action type
Browse files Browse the repository at this point in the history
  • Loading branch information
neet committed Jul 27, 2023
1 parent da940be commit 212f4c0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions src/mastodon/rest/v1/app-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ export interface AppRepository {
meta?: HttpMetaParams<"json">,
): Promise<Client>;

verifyCredentials: {
/**
* Confirm that the app's OAuth2 credentials work.
* @return Application
* @see https://docs.joinmastodon.org/methods/apps/
*/
fetch(meta?: HttpMetaParams): Promise<Client>;
};
/**
* Confirm that the app's OAuth2 credentials work.
* @return Application
* @see https://docs.joinmastodon.org/methods/apps/
*/
verifyCredentials(meta?: HttpMetaParams): Promise<Client>;
}
2 changes: 1 addition & 1 deletion tests/rest/v1/apps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("apps", () => {

it("verifies an app", () => {
return sessions.use(async (client) => {
const app = await client.rest.v1.apps.verifyCredentials.fetch();
const app = await client.rest.v1.apps.verifyCredentials();
expect(app.name).toEqual(expect.any(String));
});
});
Expand Down

0 comments on commit 212f4c0

Please sign in to comment.