🛠️ User locale for migration (#895)
This commit is contained in:
@@ -64,6 +64,7 @@ const migrateUsersCommand: yargs.CommandModule<unknown, unknown> = {
|
|||||||
id: userId,
|
id: userId,
|
||||||
email: user.email_canonical,
|
email: user.email_canonical,
|
||||||
name: `${user.first_name} ${user.last_name}`,
|
name: `${user.first_name} ${user.last_name}`,
|
||||||
|
locale: user.preferences?.locale || "fr",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!dryRun) {
|
if (!dryRun) {
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ export async function createCozyInstance(user: {
|
|||||||
email: string;
|
email: string;
|
||||||
name: string;
|
name: string;
|
||||||
_id: string;
|
_id: string;
|
||||||
|
locale: string;
|
||||||
}) {
|
}) {
|
||||||
console.log(`🚀 Creating Cozy instance for ${user.email}...`);
|
console.log(`🚀 Creating Cozy instance for ${user.email}...`);
|
||||||
|
|
||||||
@@ -51,7 +52,7 @@ export async function createCozyInstance(user: {
|
|||||||
domain: COZY_DOMAIN,
|
domain: COZY_DOMAIN,
|
||||||
email: user.email,
|
email: user.email,
|
||||||
public_name: user.name,
|
public_name: user.name,
|
||||||
locale: "fr",
|
locale: user.locale,
|
||||||
oidc: user.id,
|
oidc: user.id,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user