mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
chore(get-picker-data): make prettier format respond
Signed-off-by: Katalina Okano <git@kat.cafe>
This commit is contained in:
parent
455632d72d
commit
c1b9153bf4
1 changed files with 2 additions and 17 deletions
|
@ -7,15 +7,7 @@ import {
|
||||||
import { respond, withSession } from '../utils/api-tools';
|
import { respond, withSession } from '../utils/api-tools';
|
||||||
import { getGuild, getGuildData, getGuildMemberRoles } from '../utils/guild';
|
import { getGuild, getGuildData, getGuildMemberRoles } from '../utils/guild';
|
||||||
|
|
||||||
const fail = () =>
|
const fail = () => respond({ error: 'guild not found' }, { status: 404 });
|
||||||
respond(
|
|
||||||
{
|
|
||||||
error: 'guild not found',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
status: 404,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
export const GetPickerData = withSession(
|
export const GetPickerData = withSession(
|
||||||
(session: SessionData) => async (request: Request): Promise<Response> => {
|
(session: SessionData) => async (request: Request): Promise<Response> => {
|
||||||
|
@ -23,14 +15,7 @@ export const GetPickerData = withSession(
|
||||||
const [, , guildID] = url.pathname.split('/');
|
const [, , guildID] = url.pathname.split('/');
|
||||||
|
|
||||||
if (!guildID) {
|
if (!guildID) {
|
||||||
return respond(
|
return respond({ error: 'missing guild id' }, { status: 400 });
|
||||||
{
|
|
||||||
error: 'missing guild id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
status: 400,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const { id: userID } = session.user as DiscordUser;
|
const { id: userID } = session.user as DiscordUser;
|
||||||
|
|
Loading…
Add table
Reference in a new issue