forked from baron/baron-sso
린트 적용
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { type BulkUserItem } from "../../../lib/adminApi";
|
||||
import type { BulkUserItem } from "../../../lib/adminApi";
|
||||
|
||||
export function parseUserCSV(text: string): BulkUserItem[] {
|
||||
const lines = text.split(/\r?\n/);
|
||||
@@ -20,9 +20,14 @@ export function parseUserCSV(text: string): BulkUserItem[] {
|
||||
if (value === undefined || value === "") return;
|
||||
|
||||
if (
|
||||
["email", "name", "phone", "role", "companycode", "department"].includes(
|
||||
header,
|
||||
)
|
||||
[
|
||||
"email",
|
||||
"name",
|
||||
"phone",
|
||||
"role",
|
||||
"companycode",
|
||||
"department",
|
||||
].includes(header)
|
||||
) {
|
||||
const key = header === "companycode" ? "companyCode" : header;
|
||||
item[key] = value;
|
||||
|
||||
Reference in New Issue
Block a user