Start working on login logic

This commit is contained in:
danbulant 2020-02-16 15:08:01 +01:00
parent 10274e7a91
commit 563d51cab5

View file

@ -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<string>{
throw new NotYetImplemented();
}
async login(name: string, password: string): Promise<User> {
throw new NotYetImplemented();
}
}
export default Login;