mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
chore(web): generate API functions with a single argument (#2568)
This commit is contained in:
parent
a460940430
commit
6c6c5ef651
65 changed files with 1913 additions and 491 deletions
|
|
@ -31,10 +31,12 @@
|
|||
const lastName = form.get('lastName');
|
||||
|
||||
const { status } = await api.authenticationApi.adminSignUp({
|
||||
email: String(email),
|
||||
password: String(password),
|
||||
firstName: String(firstName),
|
||||
lastName: String(lastName)
|
||||
signUpDto: {
|
||||
email: String(email),
|
||||
password: String(password),
|
||||
firstName: String(firstName),
|
||||
lastName: String(lastName)
|
||||
}
|
||||
});
|
||||
|
||||
if (status === 201) {
|
||||
|
|
|
|||
|
|
@ -29,9 +29,11 @@
|
|||
error = '';
|
||||
|
||||
const { status } = await api.userApi.updateUser({
|
||||
id: user.id,
|
||||
password: String(password),
|
||||
shouldChangePassword: false
|
||||
updateUserDto: {
|
||||
id: user.id,
|
||||
password: String(password),
|
||||
shouldChangePassword: false
|
||||
}
|
||||
});
|
||||
|
||||
if (status === 200) {
|
||||
|
|
|
|||
|
|
@ -46,10 +46,12 @@
|
|||
|
||||
try {
|
||||
const { status } = await api.userApi.createUser({
|
||||
email: String(email),
|
||||
password: String(password),
|
||||
firstName: String(firstName),
|
||||
lastName: String(lastName)
|
||||
createUserDto: {
|
||||
email: String(email),
|
||||
password: String(password),
|
||||
firstName: String(firstName),
|
||||
lastName: String(lastName)
|
||||
}
|
||||
});
|
||||
|
||||
if (status === 201) {
|
||||
|
|
|
|||
|
|
@ -21,11 +21,13 @@
|
|||
try {
|
||||
const { id, email, firstName, lastName, storageLabel } = user;
|
||||
const { status } = await api.userApi.updateUser({
|
||||
id,
|
||||
email,
|
||||
firstName,
|
||||
lastName,
|
||||
storageLabel: storageLabel || ''
|
||||
updateUserDto: {
|
||||
id,
|
||||
email,
|
||||
firstName,
|
||||
lastName,
|
||||
storageLabel: storageLabel || ''
|
||||
}
|
||||
});
|
||||
|
||||
if (status === 200) {
|
||||
|
|
@ -42,9 +44,11 @@
|
|||
const defaultPassword = 'password';
|
||||
|
||||
const { status } = await api.userApi.updateUser({
|
||||
id: user.id,
|
||||
password: defaultPassword,
|
||||
shouldChangePassword: true
|
||||
updateUserDto: {
|
||||
id: user.id,
|
||||
password: defaultPassword,
|
||||
shouldChangePassword: true
|
||||
}
|
||||
});
|
||||
|
||||
if (status == 200) {
|
||||
|
|
|
|||
|
|
@ -57,8 +57,10 @@
|
|||
loading = true;
|
||||
|
||||
const { data } = await api.authenticationApi.login({
|
||||
email,
|
||||
password
|
||||
loginCredentialDto: {
|
||||
email,
|
||||
password
|
||||
}
|
||||
});
|
||||
|
||||
if (!data.isAdmin && data.shouldChangePassword) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue