fix: Lowercase email everywhere
This commit is contained in:
parent
76c1480903
commit
bc463c37f4
@ -4,8 +4,8 @@ import { ErrorHandler } from '$lib/database';
|
||||
import type { RequestHandler } from '@sveltejs/kit';
|
||||
|
||||
export const post: RequestHandler = async (event) => {
|
||||
let { email, password } = await event.request.json();
|
||||
email = email.toLowerCase();
|
||||
const { email, password } = await event.request.json();
|
||||
|
||||
try {
|
||||
const { body } = await db.login({ email, password });
|
||||
event.locals.session.data = body;
|
||||
|
@ -18,7 +18,7 @@
|
||||
async function handleSubmit() {
|
||||
loading = true;
|
||||
try {
|
||||
const { teamId } = await post(`/login.json`, { email, password });
|
||||
const { teamId } = await post(`/login.json`, { email: email.toLowerCase(), password });
|
||||
if (teamId === '0') {
|
||||
window.location.replace('/settings');
|
||||
} else {
|
||||
|
@ -47,7 +47,7 @@
|
||||
await post(`/teams/${id}/invitation/invite.json`, {
|
||||
teamId: team.id,
|
||||
teamName: invitation.teamName,
|
||||
email: invitation.email,
|
||||
email: invitation.email.toLowerCase(),
|
||||
permission: invitation.permission
|
||||
});
|
||||
return window.location.reload();
|
||||
|
Loading…
x
Reference in New Issue
Block a user