import { Service, Autowired } from "odi";
import { TodoRepository } from "./todo.repository"
export class TodoService {
return this.todoRep.find();
public async getUsedSpace() {
const todos = await this.getTodos();
const rolled = todos.reduce((p,todo) => p += todo.title, '');
return Buffer.byteLength(rolled, 'utf8');