remove rewrites
This commit is contained in:
parent
8dbdfbdb3f
commit
1350ede800
web
@ -3,14 +3,6 @@ import type { NextConfig } from "next";
|
|||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
distDir: "build",
|
distDir: "build",
|
||||||
output: "standalone",
|
output: "standalone",
|
||||||
rewrites: async () => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
source: "/api/:path*",
|
|
||||||
destination: "http://localhost:8082/v1/:path*"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ interface ReviewId {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ReviewButtonClicked(action: Action, submissionId: string) {
|
function ReviewButtonClicked(action: Action, submissionId: string) {
|
||||||
fetch(`/api/submissions/${submissionId}/status/${action}`, {
|
fetch(`/v1/submissions/${submissionId}/status/${action}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-type": "application/json",
|
"Content-type": "application/json",
|
||||||
|
@ -77,7 +77,7 @@ export default function SubmissionInfoPage() {
|
|||||||
|
|
||||||
useEffect(() => { // needs to be client sided since server doesn't have a session, nextjs got mad at me for exporting an async function: (https://nextjs.org/docs/messages/no-async-client-component)
|
useEffect(() => { // needs to be client sided since server doesn't have a session, nextjs got mad at me for exporting an async function: (https://nextjs.org/docs/messages/no-async-client-component)
|
||||||
async function getSubmission() {
|
async function getSubmission() {
|
||||||
const res = await fetch(`/api/submissions/${dynamicId.submissionId}`)
|
const res = await fetch(`/v1/submissions/${dynamicId.submissionId}`)
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
setSubmission(await res.json())
|
setSubmission(await res.json())
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ export default function SubmissionInfoPage() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function fetchSubmissions() {
|
async function fetchSubmissions() {
|
||||||
const res = await fetch('/api/submissions?Page=1&Limit=100')
|
const res = await fetch('/v1/submissions?Page=1&Limit=100')
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
setSubmissions(await res.json())
|
setSubmissions(await res.json())
|
||||||
}
|
}
|
||||||
@ -99,4 +99,4 @@ export default function SubmissionInfoPage() {
|
|||||||
</main>
|
</main>
|
||||||
</Webpage>
|
</Webpage>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ export default function SubmissionInfoPage() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Send the POST request
|
// Send the POST request
|
||||||
const response = await fetch("/api/submissions", {
|
const response = await fetch("/v1/submissions", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify(payload),
|
body: JSON.stringify(payload),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user