Skip to content

Commit 81ec1b0

Browse files
committed
Fix unterminated string literal
1 parent bb0b52c commit 81ec1b0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

peerprep/api/gateway.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import { cookies } from "next/headers";
2-
import { LoginResponse, Question, StatusBody, UserServiceResponse } from "./structs";
2+
import {
3+
LoginResponse,
4+
Question,
5+
StatusBody,
6+
UserServiceResponse,
7+
} from "./structs";
38
import DOMPurify from "isomorphic-dompurify";
49
import { CookieNames } from "@/app/actions/session";
510
import { revalidatePath } from "next/cache";
@@ -26,7 +31,7 @@ export function generateJSONHeaders() {
2631
}
2732

2833
export async function fetchQuestion(
29-
questionId: numbe,
34+
questionId: number,
3035
): Promise<Question | StatusBody> {
3136
try {
3237
const response = await fetch(
@@ -40,7 +45,7 @@ export async function fetchQuestion(
4045
if (!response.ok) {
4146
return {
4247
error: await response.text(),
43-
status: response.statu,
48+
status: response.status,
4449
};
4550
}
4651

@@ -94,7 +99,7 @@ export async function postSignupUser(validatedFields: {
9499
method: "POST",
95100
body: JSON.stringify(validatedFields),
96101
headers: {
97-
"Content-type": "application/json; charset=UTF-8,
102+
"Content-type": "application/json; charset=UTF-8",
98103
},
99104
},
100105
);
@@ -117,7 +122,7 @@ export async function verifyUser(): Promise<UserServiceResponse | StatusBody> {
117122
`${process.env.NEXT_PUBLIC_NGINX}/${process.env.NEXT_PUBLIC_USER_SERVICE}/auth/verify-token`,
118123
{
119124
method: "GET",
120-
headers: generateAuthHeaders()
125+
headers: generateAuthHeaders(),
121126
},
122127
);
123128
const json = await res.json();

0 commit comments

Comments
 (0)