chore(get-picker-data): make prettier format respond

Signed-off-by: Katalina Okano <git@kat.cafe>
This commit is contained in:
41666 2020-12-19 20:12:05 -05:00
parent 455632d72d
commit c1b9153bf4

View file

@ -7,15 +7,7 @@ import {
import { respond, withSession } from '../utils/api-tools';
import { getGuild, getGuildData, getGuildMemberRoles } from '../utils/guild';
const fail = () =>
respond(
{
error: 'guild not found',
},
{
status: 404,
}
);
const fail = () => respond({ error: 'guild not found' }, { status: 404 });
export const GetPickerData = withSession(
(session: SessionData) => async (request: Request): Promise<Response> => {
@ -23,14 +15,7 @@ export const GetPickerData = withSession(
const [, , guildID] = url.pathname.split('/');
if (!guildID) {
return respond(
{
error: 'missing guild id',
},
{
status: 400,
}
);
return respond({ error: 'missing guild id' }, { status: 400 });
}
const { id: userID } = session.user as DiscordUser;