fixing domain url in call
This commit is contained in:
parent
1af8ce94f4
commit
f78be56139
@ -3,7 +3,7 @@ import Users from "@/app/features/Pages/Admin/Users/users";
|
|||||||
export default async function BackOfficeUsersPage() {
|
export default async function BackOfficeUsersPage() {
|
||||||
const baseUrl =
|
const baseUrl =
|
||||||
process.env.NEXT_PUBLIC_BASE_URL
|
process.env.NEXT_PUBLIC_BASE_URL
|
||||||
? `https://${process.env.NEXT_PUBLIC_BASE_URL}`
|
? `${process.env.NEXT_PUBLIC_BASE_URL}`
|
||||||
: "http://localhost:3000";
|
: "http://localhost:3000";
|
||||||
const res = await fetch(`${baseUrl}/api/dashboard/admin/users`, {
|
const res = await fetch(`${baseUrl}/api/dashboard/admin/users`, {
|
||||||
cache: "no-store", // 👈 disables caching for SSR freshness
|
cache: "no-store", // 👈 disables caching for SSR freshness
|
||||||
|
|||||||
@ -5,7 +5,7 @@ export async function getTransactionsHistory({
|
|||||||
}) {
|
}) {
|
||||||
const baseUrl =
|
const baseUrl =
|
||||||
process.env.NEXT_PUBLIC_BASE_URL
|
process.env.NEXT_PUBLIC_BASE_URL
|
||||||
? `https://${process.env.NEXT_PUBLIC_BASE_URL}`
|
? `${process.env.NEXT_PUBLIC_BASE_URL}`
|
||||||
: "http://localhost:3000";
|
: "http://localhost:3000";
|
||||||
const res = await fetch(
|
const res = await fetch(
|
||||||
`${baseUrl}/api/dashboard/transactionsHistory?${query}`,
|
`${baseUrl}/api/dashboard/transactionsHistory?${query}`,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user