mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-02 03:35:18 +02:00
admin fixes
This commit is contained in:
parent
94159d3624
commit
2ff47cbaf3
2 changed files with 11 additions and 8 deletions
|
@ -58,16 +58,16 @@ export const actions: Actions = {
|
|||
|
||||
let currentUser = (await resCurrent.json()) as User;
|
||||
|
||||
if (username === currentUser.username) {
|
||||
if (username === currentUser.username || !username) {
|
||||
username = undefined;
|
||||
}
|
||||
if (first_name === currentUser.first_name) {
|
||||
if (first_name === currentUser.first_name || !first_name) {
|
||||
first_name = undefined;
|
||||
}
|
||||
if (last_name === currentUser.last_name) {
|
||||
if (last_name === currentUser.last_name || !last_name) {
|
||||
last_name = undefined;
|
||||
}
|
||||
if (currentUser.profile_pic && !profile_pic) {
|
||||
if (currentUser.profile_pic && profile_pic?.size === 0) {
|
||||
profile_pic = undefined;
|
||||
}
|
||||
|
||||
|
@ -101,8 +101,6 @@ export const actions: Actions = {
|
|||
return fail(res.status, response);
|
||||
}
|
||||
|
||||
let user = response as User;
|
||||
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue