mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 18:33:01 +00:00
CSRF implementation on server helpers
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { UserRecord } from "@issue/shared";
|
||||
import { getAuthHeaders, getServerURL } from "@/lib/utils";
|
||||
import { getServerURL } from "@/lib/utils";
|
||||
import type { ServerQueryInput } from "..";
|
||||
|
||||
export async function byUsername({
|
||||
@@ -13,7 +13,7 @@ export async function byUsername({
|
||||
url.searchParams.set("username", username);
|
||||
|
||||
const res = await fetch(url.toString(), {
|
||||
headers: getAuthHeaders(),
|
||||
credentials: "include",
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
|
||||
Reference in New Issue
Block a user