Lemon nextcloud migration (#338)

This commit is contained in:
Anton Shepilov
2024-01-22 22:18:01 +03:00
committed by GitHub
parent 184b9acbe3
commit 46c3f36338
2 changed files with 11 additions and 10 deletions
@@ -1,5 +1,5 @@
import express, { Express, Request, Response } from "express";
import { NextcloudMigration, NextcloudMigrationConfiguration } from './nextcloud_migration.js';
import { NextcloudMigration, NextcloudMigrationConfiguration } from './nextcloud_migration';
import { logger } from "./logger"
import { UserProviderType } from "./user/user_privider";
@@ -10,7 +10,7 @@ app.use(express.json());
app.use(express.urlencoded());
const config: NextcloudMigrationConfiguration = {
ldap: {
shell: {
baseDn: process.env.LDAP_BASE!,
url: process.env.LDAP_URL!,
},
@@ -30,12 +30,13 @@ const config: NextcloudMigrationConfiguration = {
userProvider: process.env.USER_PROVIDER! as UserProviderType
}
if (!config.ldap.baseDn) {
throw new Error("LDAP base has to be set")
}
if (!config.ldap.url) {
throw new Error("LDAP url has to be set")
}
// if (!config.shell.baseDn) {
// throw new Error("LDAP base has to be set")
// }
// if (!config.shell.url) {
// throw new Error("LDAP url has to be set")
// }
if (!config.drive.url) {
throw new Error("Twake Drive url host has to be set")
}