Compare commits
No commits in common. "3d8ce8356fc38baa488fe7491801d28a5a7a0642" and "6d8238f394532ded02c5800d04eaf20bb40c8e10" have entirely different histories.
3d8ce8356f
...
6d8238f394
@ -348,18 +348,7 @@ export default function () {
|
|||||||
const newDate = (
|
const newDate = (
|
||||||
document.getElementById("reschedule-input") as HTMLInputElement
|
document.getElementById("reschedule-input") as HTMLInputElement
|
||||||
).value;
|
).value;
|
||||||
const day = parseInt(newDate.split("-").at(2) ?? "");
|
const day = newDate.split("-").at(2);
|
||||||
|
|
||||||
if (isNaN(day)) {
|
|
||||||
toast({
|
|
||||||
description: "Please select a date, then try again.",
|
|
||||||
status: "error",
|
|
||||||
title: "No date selected",
|
|
||||||
});
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const rescheduleResp = await fetch(`/api/events-team/events/${eventId}`, {
|
const rescheduleResp = await fetch(`/api/events-team/events/${eventId}`, {
|
||||||
body: JSON.stringify({ day }),
|
body: JSON.stringify({ day }),
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -271,7 +271,7 @@ async function setAuth(context: RequestContext) {
|
|||||||
|
|
||||||
async function setBody(context: RequestContext) {
|
async function setBody(context: RequestContext) {
|
||||||
if (
|
if (
|
||||||
["PATCH", "POST", "PUT"].includes(context.request.method) &&
|
context.request.method === "POST" &&
|
||||||
!context.request.url.endsWith("/api/infractions/new")
|
!context.request.url.endsWith("/api/infractions/new")
|
||||||
) {
|
) {
|
||||||
if (
|
if (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user