From 563d51cab559d9d246a3d4f24ef5bcead7553448 Mon Sep 17 00:00:00 2001 From: danbulant Date: Sun, 16 Feb 2020 15:08:01 +0100 Subject: [PATCH] Start working on login logic --- client/src/managers/login.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 client/src/managers/login.ts diff --git a/client/src/managers/login.ts b/client/src/managers/login.ts new file mode 100644 index 0000000..8fbd53f --- /dev/null +++ b/client/src/managers/login.ts @@ -0,0 +1,20 @@ +import User from './user'; +import NotYetImplemented from '../errors/notYetImplemented'; + +class Login { + user: User = null; + + checkName(name: string): boolean{ + return /[a-z0-9_-](?:@[a-z0-9_-])/gi.test(name); + } + + async fetchAvatar(name: string): Promise{ + throw new NotYetImplemented(); + } + + async login(name: string, password: string): Promise { + throw new NotYetImplemented(); + } +} + +export default Login; \ No newline at end of file