fuckywucky
This commit is contained in:
parent
10f678cda9
commit
22971f460d
3 changed files with 6 additions and 6 deletions
|
@ -95,7 +95,7 @@ export async function POST(request: NextRequest, {params}: {params: {content: st
|
||||||
if (body.id != null) te.push("id");
|
if (body.id != null) te.push("id");
|
||||||
if (body.author_id != null) te.push("author_id");
|
if (body.author_id != null) te.push("author_id");
|
||||||
if (body.content_id != null) te.push("content_id");
|
if (body.content_id != null) te.push("content_id");
|
||||||
if (typeof body.content !== 'string' && body.description.length >= 10 && body.description.length <= 10000) te.push("content");
|
if (typeof body.content !== 'string' || body.description.length < 10 || body.description.length > 10000) te.push("content");
|
||||||
if (body.published != null) te.push("published");
|
if (body.published != null) te.push("published");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -100,9 +100,9 @@ export async function POST(request: NextRequest, {params}: {params: {jam: string
|
||||||
if (body.id != null) te.push("id");
|
if (body.id != null) te.push("id");
|
||||||
if (body.author_id != null) te.push("author_id");
|
if (body.author_id != null) te.push("author_id");
|
||||||
if (body.jam_id != null) te.push("jam_id");
|
if (body.jam_id != null) te.push("jam_id");
|
||||||
if (typeof body.name !== 'string' && body.name.length >= 10 && body.name.length <= 2048) te.push("name");
|
if (typeof body.name !== 'string' || body.name.length < 10 || body.name.length > 2048) te.push("name");
|
||||||
if (typeof body.description !== 'string' && body.description.length >= 10 && body.description.length <= 10000) te.push("description");
|
if (typeof body.description !== 'string' || body.description.length < 10 || body.description.length > 10000) te.push("description");
|
||||||
if (typeof body.url !== 'string' && body.url.length >= 3 && body.url.length <= 2048) te.push("url");
|
if (typeof body.url !== 'string' || body.url.length < 3 || body.url.length > 2048) te.push("url");
|
||||||
if (body.submitted != null) te.push("submitted");
|
if (body.submitted != null) te.push("submitted");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -69,8 +69,8 @@ export async function POST(request: NextRequest) {
|
||||||
const te = [];
|
const te = [];
|
||||||
if (body.id != null) te.push("id");
|
if (body.id != null) te.push("id");
|
||||||
if (body.author_id != null) te.push("author_id");
|
if (body.author_id != null) te.push("author_id");
|
||||||
if (typeof body.name !== 'string' && body.name.length >= 10 && body.name.length <= 2048) te.push("name");
|
if (typeof body.name !== 'string' || body.name.length < 10 || body.name.length > 2048) te.push("name");
|
||||||
if (typeof body.description !== 'string' && body.description.length >= 10 && body.description.length <= 10000) te.push("description");
|
if (typeof body.description !== 'string' || body.description.length < 10 || body.description.length > 10000) te.push("description");
|
||||||
if (typeof body.date_start !== 'number') te.push("date_start");
|
if (typeof body.date_start !== 'number') te.push("date_start");
|
||||||
if (typeof body.date_end !== 'number') te.push("date_end");
|
if (typeof body.date_end !== 'number') te.push("date_end");
|
||||||
if (body.created != null) te.push("created");
|
if (body.created != null) te.push("created");
|
||||||
|
|
Loading…
Reference in a new issue