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 }) {
|
export async function loader({ context }: { context: RequestContext }) {
|
||||||
const { current_user: currentUser } = context.data;
|
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)
|
if (!currentUser)
|
||||||
throw new Response(
|
throw new Response(null, {
|
||||||
JSON.stringify({
|
|
||||||
ch,
|
|
||||||
ua,
|
|
||||||
}),
|
|
||||||
{
|
|
||||||
status: 401,
|
status: 401,
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
const departments = {
|
const departments = {
|
||||||
DM: 1 << 2,
|
DM: 1 << 2,
|
||||||
@ -85,7 +77,7 @@ export async function loader({ context }: { context: RequestContext }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!allowedTypes.length)
|
if (!allowedTypes.length)
|
||||||
throw new Response(JSON.stringify({ ch, ua }), {
|
throw new Response(null, {
|
||||||
status: 403,
|
status: 403,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user