mirror of
https://github.com/PretendoNetwork/miiverse-api.git
synced 2026-04-24 07:06:55 -05:00
More ✂️
This commit is contained in:
parent
792fdf9f40
commit
919b74d64e
|
|
@ -257,11 +257,16 @@ router.post('/', multer().none(), async function (request: express.Request, resp
|
|||
}
|
||||
|
||||
request.body.name = request.body.name.trim();
|
||||
request.body.icon = request.body.icon.trim();
|
||||
|
||||
if (request.body.description) {
|
||||
request.body.description = request.body.description.trim();
|
||||
}
|
||||
|
||||
if (request.body.app_data) {
|
||||
request.body.app_data = request.body.app_data.trim();
|
||||
}
|
||||
|
||||
// Name must be at least 4 character long
|
||||
if (request.body.name.length < 4) {
|
||||
return respondCommunityError(response, 400, 20);
|
||||
|
|
@ -427,11 +432,11 @@ router.post('/:community_id', multer().none(), async function (request: express.
|
|||
}
|
||||
|
||||
if (request.body.icon) {
|
||||
community.icon = request.body.icon;
|
||||
community.icon = request.body.icon.trim();
|
||||
}
|
||||
|
||||
if (request.body.app_data) {
|
||||
community.app_data = request.body.app_data;
|
||||
community.app_data = request.body.app_data.trim();
|
||||
}
|
||||
|
||||
await community.save();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user