deno.land / x / alosaur@v1.1.1 / examples / auth / services / auth.service.ts

auth.service.ts
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { Injectable } from "../../../src/di/mod.ts";
export interface UserModel { id: string; login: string;}
@Injectable()export class AuthService { validate(login: string, password: string): UserModel | undefined { if (login === "admin" && password === "admin") { return { id: "1", login: "admin" }; } return undefined; }}
alosaur

Version Info

Tagged at
a year ago