補上成員的刪除方法
This commit is contained in:
parent
d3ae86b18d
commit
89cd1357f0
@ -64,6 +64,14 @@ fun Application.configureMemberRouting() {
|
||||
MemberService.updateById(id, oldData)
|
||||
call.respond(HttpStatusCode.OK, oldData)
|
||||
}
|
||||
delete("/{id}") {
|
||||
val id = call.parameters.getOrFail<String>("id")
|
||||
if (MemberService.deleteById(id)) {
|
||||
call.respond(HttpStatusCode.OK)
|
||||
} else {
|
||||
call.respond(HttpStatusCode.NotFound)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user