forked from Wroclaw/WorkshopTasker
set proper response status for creation
This commit is contained in:
parent
67cad656d5
commit
42a1c9fe1a
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* global defineEventHandler, getQuery, createError, readBody */
|
/* global defineEventHandler, getQuery, createError, readBody, setResponseStatus */
|
||||||
import { QueryObject } from "ufo";
|
import { QueryObject } from "ufo";
|
||||||
import { H3Event } from "h3";
|
import { H3Event } from "h3";
|
||||||
import { ResultSetHeader } from "mysql2/promise";
|
import { ResultSetHeader } from "mysql2/promise";
|
||||||
|
@ -146,6 +146,8 @@ export default class BaaPagination<T extends {[k: string]: any}, keyType extends
|
||||||
arrayToInsert,
|
arrayToInsert,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
setResponseStatus(e, 201);
|
||||||
|
|
||||||
// FIXME: data may be turncated in the database
|
// FIXME: data may be turncated in the database
|
||||||
// either throw an error when data is too large or
|
// either throw an error when data is too large or
|
||||||
// reply with turncated data
|
// reply with turncated data
|
||||||
|
|
Loading…
Reference in a new issue