mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
refactor utils
This commit is contained in:
1 parent
9509bbc355
commit
d6c95cea4a
13 files changed
+126
-31
No files matched your search
@@ -1,7 +1,12 @@
|
||||
import { User, UserProfile } from '@linux-odyssey/models'
|
||||
import { SocialLogin } from '../auth/oauthVerify.js'
|
||||
import { hashPassword } from '../utils/auth.js'
|
||||
|
||||
export async function createUser(username, email, { password, socialLogin }) {
|
||||
export async function createUser(
|
||||
username: string,
|
||||
email: string,
|
||||
{ password, socialLogin }: { password?: string; socialLogin?: SocialLogin }
|
||||
) {
|
||||
const user = new User({
|
||||
username,
|
||||
email,
|
||||
Reference in new issue
Block a user