mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
Update Database.svelte
This commit is contained in:
parent
74140ea251
commit
a2aa68c84a
1 changed files with 1 additions and 26 deletions
|
|
@ -24,19 +24,7 @@
|
|||
const exportUsers = async () => {
|
||||
const users = await getAllUsers(localStorage.token);
|
||||
|
||||
const headers = [
|
||||
'id',
|
||||
'name',
|
||||
'email',
|
||||
'role',
|
||||
'profile_image_url',
|
||||
'last_active_at',
|
||||
'updated_at',
|
||||
'created_at',
|
||||
'api_key',
|
||||
'settings',
|
||||
'info'
|
||||
];
|
||||
const headers = ['id', 'name', 'email', 'role'];
|
||||
|
||||
const csv = [
|
||||
headers.join(','),
|
||||
|
|
@ -46,19 +34,6 @@
|
|||
if (user[header] === null || user[header] === undefined) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (header === 'settings' || header === 'info') {
|
||||
return `"${JSON.stringify(user[header]).replace(/"/g, '""')}"`;
|
||||
}
|
||||
|
||||
if (
|
||||
header === 'last_active_at' ||
|
||||
header === 'updated_at' ||
|
||||
header === 'created_at'
|
||||
) {
|
||||
return new Date(user[header] * 1000).toISOString();
|
||||
}
|
||||
|
||||
return `"${String(user[header]).replace(/"/g, '""')}"`;
|
||||
})
|
||||
.join(',');
|
||||
|
|
|
|||
Loading…
Reference in a new issue