You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
454 B
22 lines
454 B
export async function POST(req: Request) {
|
|
const data = await req.json();
|
|
|
|
const { username, sites, withNSFW } = data;
|
|
|
|
const f = [];
|
|
|
|
if (withNSFW)
|
|
f.push("nsfw");
|
|
|
|
return await fetch("http://api:8000", {
|
|
method: "POST",
|
|
headers: {
|
|
"Content-Type": "application/json"
|
|
},
|
|
body: JSON.stringify({
|
|
usernames: [username],
|
|
sites,
|
|
f
|
|
})
|
|
});
|
|
} |