diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-03 08:06:34 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-03 08:06:34 +0900 |
| commit | 67f9c158d71c497f3f3889e10fa1587a9a038381 (patch) | |
| tree | 68da64c714a2028717b8b0db2fc6dd5bc965bd37 /src/api/endpoints/i.ts | |
| parent | wip (diff) | |
| download | sharkey-67f9c158d71c497f3f3889e10fa1587a9a038381.tar.gz sharkey-67f9c158d71c497f3f3889e10fa1587a9a038381.tar.bz2 sharkey-67f9c158d71c497f3f3889e10fa1587a9a038381.zip | |
wip
Diffstat (limited to 'src/api/endpoints/i.ts')
| -rw-r--r-- | src/api/endpoints/i.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/api/endpoints/i.ts b/src/api/endpoints/i.ts new file mode 100644 index 0000000000..df8c0d0e00 --- /dev/null +++ b/src/api/endpoints/i.ts @@ -0,0 +1,25 @@ +'use strict'; + +/** + * Module dependencies + */ +import serialize from '../serializers/user'; + +/** + * Show myself + * + * @param {any} params + * @param {any} user + * @param {any} app + * @param {Boolean} isSecure + * @return {Promise<any>} + */ +module.exports = (params, user, _, isSecure) => + new Promise(async (res, rej) => +{ + // Serialize + res(await serialize(user, user, { + detail: true, + includeSecrets: isSecure + })); +}); |