Update get_invite.ts

This commit is contained in:
ITOH
2021-05-04 22:24:37 +02:00
parent 147453cd1e
commit c5cf4ba353
+2 -2
View File
@@ -5,10 +5,10 @@ import { endpoints } from "../../util/constants.ts";
import { camelKeysToSnakeCase } from "../../util/utils.ts";
/** Returns an invite for the given code or throws an error if the invite doesn't exists. */
export async function getInvite(inviteCode: string, options: GetInvite) {
export async function getInvite(inviteCode: string, options?: GetInvite) {
return await rest.runMethod<Invite>(
"get",
endpoints.INVITE(inviteCode),
camelKeysToSnakeCase(options),
camelKeysToSnakeCase(options ?? {}),
);
}