Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: trying to bypass rewrites #45

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export async function refreshAccessToken() {
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
export async function getUser(): Promise<User | null> {
try {
const response = await fetch("http://localhost:3000/api/user/get", {
const response = await fetch(process.env.BACKEND_DOMAIN + "/api/user/get", {
method: "GET",
headers: {
"Content-Type": "application/json;charset=UTF-8",
Expand Down Expand Up @@ -145,7 +145,7 @@ export async function loginUser(prevState: LoginFormState, formData: FormData):
const encodedData = new URLSearchParams(data as Record<string, string>).toString();

try {
const response = await fetch(process.env.FRONTEND_DOMAIN + "/api/user/login", {
const response = await fetch("https://ipk-frontend.netlify.app/api/user/login", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
Expand Down
Loading