1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-03 12:36:06 +02:00

Initial commit 🍀

This commit is contained in:
syuilo
2016-12-29 07:49:51 +09:00
commit b3f42e62af
405 changed files with 29181 additions and 0 deletions

13
src/api/reply.ts Normal file
View File

@@ -0,0 +1,13 @@
import * as express from 'express';
export default (res: express.Response, x?: any, y?: any) => {
if (x === undefined) {
res.sendStatus(204);
} else if (typeof x === 'number') {
res.status(x).send({
error: x === 500 ? 'INTERNAL_ERROR' : y
});
} else {
res.send(x);
}
};