mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-06-21 09:05:17 +00:00
Can get language settings
This commit is contained in:
@ -87,6 +87,8 @@ export const Routes : Route[] = [
|
||||
|
||||
{path: "/settings/check_user_directory_availability", cb: (h) => SettingsController.CheckDirectoryAvailability(h)},
|
||||
|
||||
{path: "/settings/get_language", cb: (h) => SettingsController.GetLanguage(h)},
|
||||
|
||||
|
||||
// Friends controller
|
||||
{path: "/friends/getList", cb: (h) => FriendsController.GetList(h)},
|
||||
|
@ -103,4 +103,19 @@ export class SettingsController {
|
||||
h.success("The directory is available!");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get language settings
|
||||
*
|
||||
* @param h Request handler
|
||||
*/
|
||||
public static async GetLanguage(h: RequestHandler) {
|
||||
|
||||
const userInfo = await UserHelper.GetUserInfo(h.getUserId());
|
||||
|
||||
h.send({
|
||||
lang: userInfo.lang
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user