forked from baron/baron-sso
린트 적용3
This commit is contained in:
@@ -13,11 +13,12 @@ export function parseUserCSV(text: string): BulkUserItem[] {
|
||||
if (!lines[i].trim()) continue;
|
||||
|
||||
const values = lines[i].split(",").map((v) => v.trim());
|
||||
const item: any = { metadata: {} };
|
||||
const item: Record<string, any> = { metadata: {} };
|
||||
|
||||
headers.forEach((header, index) => {
|
||||
for (let index = 0; index < headers.length; index++) {
|
||||
const header = headers[index];
|
||||
const value = values[index];
|
||||
if (value === undefined || value === "") return;
|
||||
if (value === undefined || value === "") continue;
|
||||
|
||||
if (
|
||||
[
|
||||
@@ -34,7 +35,7 @@ export function parseUserCSV(text: string): BulkUserItem[] {
|
||||
} else {
|
||||
item.metadata[header] = value;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (item.email && item.name) {
|
||||
data.push(item as BulkUserItem);
|
||||
|
||||
Reference in New Issue
Block a user