Skip to content

Commit

Permalink
fix: default server language
Browse files Browse the repository at this point in the history
  • Loading branch information
Monta authored and Monta committed Nov 3, 2023
1 parent 864ef90 commit 456f663
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tdrive/backend/node/src/services/documents/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const isSharedWithMeFolder = (id: string) => {

export const getVirtualFoldersNames = async (id: string, context: DriveExecutionContext) => {
const configuration = new Configuration("drive");
const defaultLang = configuration.get("defaultLanguage", "en") as string;
const defaultLang = configuration.get<string>("defaultLanguage") || "en";
const user = await gr.services.users.get({ id: context.user?.id });
const locale = user?.preferences?.locale || defaultLang;

Expand Down
2 changes: 1 addition & 1 deletion tdrive/backend/node/src/utils/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function formatUser(
): Promise<UserObject> {
if (!user) return null;
const configuration = new Configuration("drive");
const defaultLang = configuration.get("defaultLanguage", "en") as string;
const defaultLang = configuration.get<string>("defaultLanguage") || "en";

let resUser = {
id: user.id,
Expand Down

0 comments on commit 456f663

Please sign in to comment.