Skip to content

Instantly share code, notes, and snippets.

Created Jun 12, 2020
What would you like to do?
import { Database } from '../database.ts';
import { Injectable } from '';
export interface User {
id: number;
name: string;
export class UserService {
constructor(private db: Database){}
async getUsers(): Promise<User[]> {
return (await this.db.query("SELECT * FROM users"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment