Created
September 14, 2022 18:13
-
-
Save Prajwalprakash3722/016b07c3a756cb6d382934e9ac99521e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Todo } from "@todo.types.ts"; | |
class TodosApi { | |
getTodos(params: Todo.Controllers.Get.Request) { | |
return http.get<Todo.Controllers.Get.Response>('/todos', { | |
params, | |
}); | |
} | |
addTodo(todo: Todo.Controllers.Add.Request) { | |
return http.post<Todo.Controllers.Add.Response>('/todos', todo); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment