fsharp(todolist-api): refactor: removed unused variables
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
83cf14c2d0
commit
ba40a9c203
|
@ -30,14 +30,14 @@ module App =
|
||||||
let dbTodo = ctx |> Queries.getTodosById id
|
let dbTodo = ctx |> Queries.getTodosById id
|
||||||
|
|
||||||
match dbTodo with
|
match dbTodo with
|
||||||
| Some inner -> f (inner, ctx, id)
|
| Some inner -> f (inner, ctx)
|
||||||
| None -> id |> sprintf "Cannot find todo with id %i" |> NOT_FOUND
|
| None -> id |> sprintf "Cannot find todo with id %i" |> NOT_FOUND
|
||||||
|
|
||||||
let todoById =
|
let todoById =
|
||||||
withTodoById (fun (inner, _, _) -> respondWithTodo inner)
|
withTodoById (fun (inner, _) -> respondWithTodo inner)
|
||||||
|
|
||||||
let updateTodo =
|
let updateTodo =
|
||||||
withTodoById (fun (todo, dbContext, id) ->
|
withTodoById (fun (todo, dbContext) ->
|
||||||
fun ctx -> async {
|
fun ctx -> async {
|
||||||
let body: Types.TodoDetails = parseJson ctx.request.rawForm
|
let body: Types.TodoDetails = parseJson ctx.request.rawForm
|
||||||
|
|
||||||
|
@ -46,9 +46,7 @@ module App =
|
||||||
return! respondWithTodo todo ctx
|
return! respondWithTodo todo ctx
|
||||||
})
|
})
|
||||||
|
|
||||||
let patchTodo = withTodoById (fun (todo, dbContext, id) ->
|
let patchTodo = withTodoById (fun (todo, dbContext) ->
|
||||||
let originalTodo = todoToRecord todo
|
|
||||||
|
|
||||||
fun ctx -> async {
|
fun ctx -> async {
|
||||||
let body: Types.PartialTodoDetails = parseJson ctx.request.rawForm
|
let body: Types.PartialTodoDetails = parseJson ctx.request.rawForm
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue