mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-30 18:09:40 +05:00
feat: add authorization!
This commit is contained in:
parent
f3667eb209
commit
3a800a4933
7 changed files with 248 additions and 1 deletions
|
@ -6,11 +6,11 @@ export async function GET(request) {
|
|||
const page = parseInt(request.nextUrl.searchParams.get(["page"])) || 0;
|
||||
const query = request.nextUrl.searchParams.get(["q"]) || null;
|
||||
const token = request.nextUrl.searchParams.get(["token"]) || null;
|
||||
let url = new URL(`${ENDPOINTS.search}/${page}`);
|
||||
if (token) {
|
||||
url.searchParams.set("token", token);
|
||||
}
|
||||
const data = { query, searchBy: 0 };
|
||||
let url = new URL(`${ENDPOINTS.search}/${page}`);
|
||||
|
||||
const response = await fetchDataViaPost(url.toString(), data);
|
||||
if (!response) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue