-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
Msal
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image" href="/UNO.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<script src="./node_modules/preline/dist/preline.js"></script> | ||
<!-- <script src="https://cdn.tailwindcss.com"></script> --> | ||
<title>CSLC Tutoring Portal</title> | ||
</head> | ||
|
||
<body class="overscroll-none"> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image" href="/UNO.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>CSLC Tutoring Portal</title> | ||
</head> | ||
|
||
<body class="overscroll-none"> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
|
||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import axios from "axios" | ||
Check failure on line 1 in frontend/src/API/tickets/ticketRequests.ts GitHub Actions / run-npm
|
||
|
||
export function createTicket(data: any) { | ||
Check warning on line 3 in frontend/src/API/tickets/ticketRequests.ts GitHub Actions / run-npm
|
||
function getCookie(name) { | ||
const value = `; ${document.cookie}`; | ||
const parts = value.split(`; ${name}=`); | ||
if (parts.length === 2) return parts.pop().split(';').shift(); | ||
Check failure on line 7 in frontend/src/API/tickets/ticketRequests.ts GitHub Actions / run-npm
|
||
} | ||
const csrftoken = getCookie('csrftoken'); | ||
Check failure on line 9 in frontend/src/API/tickets/ticketRequests.ts GitHub Actions / run-npm
|
||
return axios.post("/api/tickets/", { | ||
name: data.student_name, | ||
description: data.body, | ||
professor: data.professor, | ||
course: data.section, | ||
issue: data.issue, | ||
}, | ||
{ | ||
headers: { | ||
'X-CSRFToken': csrftoken | ||
Check failure on line 19 in frontend/src/API/tickets/ticketRequests.ts GitHub Actions / run-npm
|
||
} | ||
}) | ||
.then(res => res.data); | ||
} |