mirror of
https://codeberg.org/yeentown/barkey
synced 2024-12-02 00:37:28 +00:00
[API] Fix bug
This commit is contained in:
parent
7fb816d1a4
commit
1a5641bc1a
1 changed files with 1 additions and 2 deletions
|
@ -3,7 +3,6 @@
|
||||||
*/
|
*/
|
||||||
import $ from 'cafy';
|
import $ from 'cafy';
|
||||||
import User from '../../models/user';
|
import User from '../../models/user';
|
||||||
import { validateUsername } from '../../models/user';
|
|
||||||
import serialize from '../../serializers/user';
|
import serialize from '../../serializers/user';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,7 +14,7 @@ import serialize from '../../serializers/user';
|
||||||
*/
|
*/
|
||||||
module.exports = (params, me) => new Promise(async (res, rej) => {
|
module.exports = (params, me) => new Promise(async (res, rej) => {
|
||||||
// Get 'query' parameter
|
// Get 'query' parameter
|
||||||
const [query, queryError] = $(params.query).string().pipe(validateUsername).$;
|
const [query, queryError] = $(params.query).string().$;
|
||||||
if (queryError) return rej('invalid query param');
|
if (queryError) return rej('invalid query param');
|
||||||
|
|
||||||
// Get 'offset' parameter
|
// Get 'offset' parameter
|
||||||
|
|
Loading…
Reference in a new issue