summaryrefslogtreecommitdiff
path: root/src/common/libs/authenticate.ts
blob: 48d0314633d18323e46bffc0d2d167904564ea5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const authenticate = async ({
  username,
  password,
}: {
  username: string;
  password: string;
}) => {
  const res = await fetch("/api/authenticate", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      username,
      password,
    }),
  });

  return res;
};

export default authenticate;