mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-09 20:30:54 -05:00
7 lines
232 B
TypeScript
7 lines
232 B
TypeScript
import { IMAGE_TYPES } from "./upload-constants";
|
|
|
|
export function requestToImgType(request: Request) {
|
|
const rawType = new URL(request.url).searchParams.get("type") ?? "";
|
|
return IMAGE_TYPES.find((type) => type === rawType);
|
|
}
|