mirror of
https://github.com/zebrajr/immich.git
synced 2025-12-06 00:20:20 +01:00
* Added album page * Refactor sidebar * Added album assets count info * Added album viewer page * Refactor album sorting * Fixed incorrectly showing selected asset in album selection * Improve fetching speed with prefetch * Refactor to use ImmichThubmnail component for all * Update to the latest version of Svelte * Implement fixed app bar in album viewer * Added shared user avatar * Correctly get all owned albums, including shared
35 lines
734 B
TypeScript
35 lines
734 B
TypeScript
import type { RequestHandler } from '@sveltejs/kit';
|
|
import { api } from '@api';
|
|
|
|
export const POST: RequestHandler = async ({ request }) => {
|
|
const form = await request.formData();
|
|
|
|
const email = form.get('email');
|
|
const password = form.get('password');
|
|
const firstName = form.get('firstName');
|
|
const lastName = form.get('lastName');
|
|
|
|
const { status } = await api.userApi.createUser({
|
|
email: String(email),
|
|
password: String(password),
|
|
firstName: String(firstName),
|
|
lastName: String(lastName)
|
|
});
|
|
|
|
if (status === 201) {
|
|
return {
|
|
status: 201,
|
|
body: {
|
|
success: 'Succesfully create user account'
|
|
}
|
|
};
|
|
} else {
|
|
return {
|
|
status: 400,
|
|
body: {
|
|
error: 'Error create user account'
|
|
}
|
|
};
|
|
}
|
|
};
|