fix: post now sends created user object in response

This commit is contained in:
2025-06-12 12:05:04 +02:00
parent 003ff86d18
commit 918f3f34f7
2 changed files with 3 additions and 3 deletions

View File

@@ -82,4 +82,4 @@
@if (loading) {
<mat-spinner diameter="32" color="accent"></mat-spinner>
}
</mat-dialog-actions>
</mat-dialog-actions>

View File

@@ -108,7 +108,7 @@ export class UserEditComponent {
})
)
.subscribe(data => {
if (data.status == 201) {
if (data) {
this.sb.open('Użytkownik został utworzony.', undefined, {
duration: 2500,
})
@@ -149,7 +149,7 @@ export class UserEditComponent {
room: this.form.get('room')?.value,
uname: this.form.get('uname')?.value,
groups: this.form.get('groups')?.value,
flags: (() => {
admin: (() => {
var value = this.form
.get('flags')
?.value.reduce((a: number, b: number) => a + b, 0)