mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: add migration service
This commit is contained in:
6 files changed
+99
-50
No files matched your search
@@ -179,7 +179,7 @@ declare module '@hydrooj/framework' {
|
||||
interface UserModel extends User { }
|
||||
}
|
||||
|
||||
function handleMailLower(mail: string) {
|
||||
export function handleMailLower(mail: string) {
|
||||
const [n, d] = mail.trim().toLowerCase().split('@');
|
||||
const [name] = n.split('+');
|
||||
return `${name.replace(/\./g, '')}@${d === 'googlemail.com' ? 'gmail.com' : d}`;
|
||||
|
||||
Reference in new issue
Block a user