Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove old mobile detection stuff from mod queue
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 41ec880 commit 9f3b964
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions app/routes/mod-queue.tsx
Expand Up @@ -26,19 +26,11 @@ import NewInactivityNotice from "../../components/NewInactivityNotice.js";

export async function loader({ context }: { context: RequestContext }) {
const { current_user: currentUser } = context.data;
const ch = context.request.headers.get("sec-ch-ua-mobile");
const ua = context.request.headers.get("user-agent");

if (!currentUser)
throw new Response(
JSON.stringify({
ch,
ua,
}),
{
status: 401,
}
);
throw new Response(null, {
status: 401,
});

const departments = {
DM: 1 << 2,
Expand Down Expand Up @@ -85,7 +77,7 @@ export async function loader({ context }: { context: RequestContext }) {
}

if (!allowedTypes.length)
throw new Response(JSON.stringify({ ch, ua }), {
throw new Response(null, {
status: 403,
});

Expand Down

0 comments on commit 9f3b964

Please sign in to comment.