ストリーム経由でAPIにリクエストできるように
This commit is contained in:
parent
91791834be
commit
bd3d57a67f
15 changed files with 137 additions and 179 deletions
|
@ -7,14 +7,10 @@ import event from '../../../../publishers/stream';
|
|||
|
||||
/**
|
||||
* Update myself
|
||||
*
|
||||
* @param {any} params
|
||||
* @param {any} user
|
||||
* @param {any} _
|
||||
* @param {boolean} isSecure
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
module.exports = async (params, user, _, isSecure) => new Promise(async (res, rej) => {
|
||||
module.exports = async (params, user, app) => new Promise(async (res, rej) => {
|
||||
const isSecure = user != null && app == null;
|
||||
|
||||
// Get 'name' parameter
|
||||
const [name, nameErr] = $(params.name).optional.nullable.string().pipe(isValidName).$;
|
||||
if (nameErr) return rej('invalid name param');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue