補上成員的刪除方法
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user