Frontend: licence_number>number, password update enabled

This commit is contained in:
Alex
2025-02-08 18:26:34 +01:00
parent cce2866b52
commit 32a473fe29
6 changed files with 28 additions and 21 deletions

View File

@@ -36,7 +36,7 @@ export const actions = {
console.log('Is creating: ', isCreating);
// console.dir(formData);
console.dir(processedData.user.membership);
const apiURL = `${BASE_API_URI}/backend/users/update/`;
const apiURL = `${BASE_API_URI}/backend/users/upsert/`;
/** @type {RequestInit} */
const requestUpdateOptions = {

View File

@@ -34,7 +34,7 @@ export const actions = {
console.dir(processedData.user.membership);
const isCreating = !processedData.user.id || processedData.user.id === 0;
console.log('Is creating: ', isCreating);
const apiURL = `${BASE_API_URI}/backend/users/update`;
const apiURL = `${BASE_API_URI}/backend/users/upsert`;
/** @type {RequestInit} */
const requestOptions = {
@@ -59,6 +59,6 @@ export const actions = {
console.log('Server success response:', response);
locals.user = response;
userDatesFromRFC3339(locals.user);
throw redirect(303, `/auth/about/${response.id}`);
throw redirect(303, `/auth/admin/users`);
}
};

View File

@@ -223,6 +223,7 @@
{subscriptions}
{licence_categories}
on:cancel={close}
on:close={close}
/>
</Modal>
{/if}