User profile view

This commit is contained in:
Cohee
2024-04-10 02:09:38 +03:00
parent 8f1d2e0163
commit 09b44075ed
5 changed files with 108 additions and 5 deletions

View File

@@ -33,6 +33,7 @@ router.get('/me', async (request, response) => {
avatar: getUserAvatar(user.handle),
admin: user.admin,
password: !!user.password,
created: user.created,
};
return response.json(viewModel);

View File

@@ -49,6 +49,7 @@ const STORAGE_KEYS = {
* @property {string} avatar - The user's avatar image
* @property {boolean} admin - Whether the user is an admin (can manage other users)
* @property {boolean} password - Whether the user is password protected
* @property {number} [created] - The timestamp when the user was created
*/
/**