Switch all routes to use Zod for strict validation

This commit is contained in:
Jesse Wierzbinski 2024-04-14 00:36:25 -10:00
parent 53fa9ca545
commit 0b1c1ba128
No known key found for this signature in database
67 changed files with 2459 additions and 2600 deletions

View file

@ -21,12 +21,6 @@ describe("API Tests", () => {
const response = await sendTestRequest(
new Request(
wrapRelativeUrl(`${base_url}/api/v1/instance`, base_url),
{
method: "GET",
headers: {
"Content-Type": "application/json",
},
},
),
);

View file

@ -23,10 +23,8 @@ describe("API Tests", () => {
new Request(
wrapRelativeUrl("/api/v1/accounts/999999", base_url),
{
method: "GET",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -80,10 +78,8 @@ describe("API Tests", () => {
base_url,
),
{
method: "GET",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -130,10 +126,8 @@ describe("API Tests", () => {
base_url,
),
{
method: "GET",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -585,7 +579,6 @@ describe("API Tests", () => {
method: "DELETE",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -612,7 +605,6 @@ describe("API Tests", () => {
method: "DELETE",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),

View file

@ -164,10 +164,8 @@ describe("API Tests", () => {
base_url,
),
{
method: "GET",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -218,7 +216,6 @@ describe("API Tests", () => {
method: "POST",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -249,7 +246,6 @@ describe("API Tests", () => {
method: "POST",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -276,10 +272,8 @@ describe("API Tests", () => {
base_url,
),
{
method: "GET",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -312,7 +306,6 @@ describe("API Tests", () => {
method: "GET",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -341,7 +334,6 @@ describe("API Tests", () => {
method: "GET",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -377,7 +369,6 @@ describe("API Tests", () => {
method: "POST",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -399,7 +390,6 @@ describe("API Tests", () => {
method: "GET",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),
@ -430,7 +420,6 @@ describe("API Tests", () => {
method: "POST",
headers: {
Authorization: `Bearer ${token.accessToken}`,
"Content-Type": "application/json",
},
},
),