mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-14 21: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 exportUsers = async () => {
|
||||||
const users = await getAllUsers(localStorage.token);
|
const users = await getAllUsers(localStorage.token);
|
||||||
|
|
||||||
const headers = [
|
const headers = ['id', 'name', 'email', 'role'];
|
||||||
'id',
|
|
||||||
'name',
|
|
||||||
'email',
|
|
||||||
'role',
|
|
||||||
'profile_image_url',
|
|
||||||
'last_active_at',
|
|
||||||
'updated_at',
|
|
||||||
'created_at',
|
|
||||||
'api_key',
|
|
||||||
'settings',
|
|
||||||
'info'
|
|
||||||
];
|
|
||||||
|
|
||||||
const csv = [
|
const csv = [
|
||||||
headers.join(','),
|
headers.join(','),
|
||||||
|
|
@ -46,19 +34,6 @@
|
||||||
if (user[header] === null || user[header] === undefined) {
|
if (user[header] === null || user[header] === undefined) {
|
||||||
return '';
|
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, '""')}"`;
|
return `"${String(user[header]).replace(/"/g, '""')}"`;
|
||||||
})
|
})
|
||||||
.join(',');
|
.join(',');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue