Remove old mobile detection stuff from mod queue
This commit is contained in:
parent
41ec8801d7
commit
9f3b964754
@ -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,
|
||||
@ -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,
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user