fix(dashboard): change all API endpoints from /api/gateway to /api
Some checks failed
build-and-release / build (push) Failing after 1m17s
Some checks failed
build-and-release / build (push) Failing after 1m17s
This commit is contained in:
parent
09e26d2935
commit
da7898e083
9 changed files with 13 additions and 13 deletions
|
|
@ -9,7 +9,7 @@
|
||||||
import { For, Show, createSignal, onMount } from "solid-js";
|
import { For, Show, createSignal, onMount } from "solid-js";
|
||||||
import { BTN_GHOST, BTN_ORANGE, CARD, INPUT, LABEL } from "~/components/DashboardShell";
|
import { BTN_GHOST, BTN_ORANGE, CARD, INPUT, LABEL } from "~/components/DashboardShell";
|
||||||
|
|
||||||
const API = "/api/gateway";
|
const API = "/api";
|
||||||
|
|
||||||
interface JobItem {
|
interface JobItem {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import {
|
||||||
LABEL,
|
LABEL,
|
||||||
} from "~/components/DashboardShell";
|
} from "~/components/DashboardShell";
|
||||||
|
|
||||||
const API = "/api/gateway";
|
const API = "/api";
|
||||||
|
|
||||||
interface JobItem {
|
interface JobItem {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { BTN_GHOST, BTN_ORANGE, BTN_PRIMARY, CARD, ORANGE, NAVY, PKG_CARD } from
|
||||||
import { PROFESSIONAL_ROLE_SET, ROLE_PREFIXES, type RoleKey } from "./RoleDashboardShared";
|
import { PROFESSIONAL_ROLE_SET, ROLE_PREFIXES, type RoleKey } from "./RoleDashboardShared";
|
||||||
import { openPayuCheckout } from "~/lib/payu";
|
import { openPayuCheckout } from "~/lib/payu";
|
||||||
|
|
||||||
const API = "/api/gateway";
|
const API = "/api";
|
||||||
|
|
||||||
type Props = { roleKey: RoleKey; dashboardConfig?: Record<string, any> | null };
|
type Props = { roleKey: RoleKey; dashboardConfig?: Record<string, any> | null };
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
import { For, Show, createMemo, createSignal, onMount } from "solid-js";
|
import { For, Show, createMemo, createSignal, onMount } from "solid-js";
|
||||||
import { BTN_GHOST, BTN_PRIMARY, CARD, INPUT, LABEL } from "~/components/DashboardShell";
|
import { BTN_GHOST, BTN_PRIMARY, CARD, INPUT, LABEL } from "~/components/DashboardShell";
|
||||||
|
|
||||||
const API = "/api/gateway";
|
const API = "/api";
|
||||||
|
|
||||||
type RequirementItem = {
|
type RequirementItem = {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { Camera, Scissors, GraduationCap, Code2, Clapperboard, PenTool, Megaphon
|
||||||
const NAVY = "#0D0D2A";
|
const NAVY = "#0D0D2A";
|
||||||
const ORANGE = "#FF5E13";
|
const ORANGE = "#FF5E13";
|
||||||
|
|
||||||
const API = "/api/gateway";
|
const API = "/api";
|
||||||
|
|
||||||
const MAIN_ROLES = [
|
const MAIN_ROLES = [
|
||||||
{ key: "COMPANY", name: "Company", Icon: Users, subtitle: "Hire talent, post jobs, and manage applications in one path." },
|
{ key: "COMPANY", name: "Company", Icon: Users, subtitle: "Hire talent, post jobs, and manage applications in one path." },
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { HelpCircle } from "lucide-solid";
|
||||||
import { BTN_GHOST, CARD, INPUT } from "~/components/DashboardShell";
|
import { BTN_GHOST, CARD, INPUT } from "~/components/DashboardShell";
|
||||||
import { type RoleKey } from "./RoleDashboardShared";
|
import { type RoleKey } from "./RoleDashboardShared";
|
||||||
|
|
||||||
const API = "/api/gateway";
|
const API = "/api";
|
||||||
const NAVY = "#0D0D2A";
|
const NAVY = "#0D0D2A";
|
||||||
const ORANGE = "#FF5E13";
|
const ORANGE = "#FF5E13";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import { Sparkles, Loader } from "lucide-solid";
|
||||||
import { BTN_GHOST, BTN_PRIMARY, CARD, INPUT } from "~/components/DashboardShell";
|
import { BTN_GHOST, BTN_PRIMARY, CARD, INPUT } from "~/components/DashboardShell";
|
||||||
import { readJobSeekerProfile, updateJobSeekerCustomData } from "~/lib/job-seeker-custom-data";
|
import { readJobSeekerProfile, updateJobSeekerCustomData } from "~/lib/job-seeker-custom-data";
|
||||||
|
|
||||||
const API = "/api/gateway";
|
const API = "/api";
|
||||||
|
|
||||||
type JobItem = {
|
type JobItem = {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
|
||||||
|
|
@ -269,14 +269,14 @@ export default function MyDashboardPage(props: Props) {
|
||||||
try {
|
try {
|
||||||
if (roleKey === 'COMPANY') {
|
if (roleKey === 'COMPANY') {
|
||||||
const [jobsRes, appsRes] = await Promise.all([
|
const [jobsRes, appsRes] = await Promise.all([
|
||||||
fetch('/api/gateway/companies/jobs?page=1&limit=100', {
|
fetch('/api/companies/jobs?page=1&limit=100', {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Authorization: `Bearer ${window.sessionStorage.getItem('nxtgauge_access_token') || ''}`,
|
Authorization: `Bearer ${window.sessionStorage.getItem('nxtgauge_access_token') || ''}`,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
fetch('/api/gateway/companies/jobs?page=1&limit=1', {
|
fetch('/api/companies/jobs?page=1&limit=1', {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|
@ -295,7 +295,7 @@ export default function MyDashboardPage(props: Props) {
|
||||||
);
|
);
|
||||||
if (!jobsRes.ok && !appsRes.ok) setErr('Some company metrics could not be loaded.');
|
if (!jobsRes.ok && !appsRes.ok) setErr('Some company metrics could not be loaded.');
|
||||||
} else if (roleKey === 'CUSTOMER') {
|
} else if (roleKey === 'CUSTOMER') {
|
||||||
const res = await fetch('/api/gateway/customers/requirements?page=1&limit=100', {
|
const res = await fetch('/api/customers/requirements?page=1&limit=100', {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|
@ -313,14 +313,14 @@ export default function MyDashboardPage(props: Props) {
|
||||||
if (!res.ok) setErr('Some customer metrics could not be loaded.');
|
if (!res.ok) setErr('Some customer metrics could not be loaded.');
|
||||||
} else if (roleKey === 'JOB_SEEKER') {
|
} else if (roleKey === 'JOB_SEEKER') {
|
||||||
const [jobsRes, appsRes] = await Promise.all([
|
const [jobsRes, appsRes] = await Promise.all([
|
||||||
fetch('/api/gateway/jobseeker/jobs?page=1&limit=100', {
|
fetch('/api/jobseeker/jobs?page=1&limit=100', {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
Authorization: `Bearer ${window.sessionStorage.getItem('nxtgauge_access_token') || ''}`,
|
Authorization: `Bearer ${window.sessionStorage.getItem('nxtgauge_access_token') || ''}`,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
fetch('/api/gateway/jobseeker/applications?page=1&limit=100', {
|
fetch('/api/jobseeker/applications?page=1&limit=100', {
|
||||||
credentials: 'include',
|
credentials: 'include',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { For, Show, createMemo, createSignal, onMount } from "solid-js";
|
||||||
import { BTN_GHOST, BTN_PRIMARY, CARD, INPUT } from "~/components/DashboardShell";
|
import { BTN_GHOST, BTN_PRIMARY, CARD, INPUT } from "~/components/DashboardShell";
|
||||||
import { ROLE_PREFIXES, type RoleKey } from "./RoleDashboardShared";
|
import { ROLE_PREFIXES, type RoleKey } from "./RoleDashboardShared";
|
||||||
|
|
||||||
const API = "/api/gateway";
|
const API = "/api";
|
||||||
|
|
||||||
type Props = { roleKey: RoleKey };
|
type Props = { roleKey: RoleKey };
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue