mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
Switch all routes to use Zod for strict validation
This commit is contained in:
parent
53fa9ca545
commit
0b1c1ba128
67 changed files with 2459 additions and 2600 deletions
|
|
@ -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",
|
||||
},
|
||||
},
|
||||
),
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
},
|
||||
},
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue