admin: can sort claim by last_update
This commit is contained in:
parent
83b7df7e69
commit
d8584a8a31
4 changed files with 31 additions and 2 deletions
|
|
@ -32,6 +32,7 @@ func init() {
|
|||
router.POST("/api/claims/:cid", apiHandler(claimHandler(addClaimDescription)))
|
||||
router.DELETE("/api/claims/:cid", apiHandler(claimHandler(deleteClaim)))
|
||||
|
||||
router.GET("/api/claims/:cid/last_update", apiHandler(claimHandler(getClaimLastUpdate)))
|
||||
router.PUT("/api/claims/:cid/descriptions", apiHandler(claimHandler(updateClaimDescription)))
|
||||
|
||||
// Assignees
|
||||
|
|
@ -55,6 +56,10 @@ func getExerciceClaims(exercice fic.Exercice, _ []byte) (interface{}, error) {
|
|||
return exercice.GetClaims()
|
||||
}
|
||||
|
||||
func getClaimLastUpdate(claim fic.Claim, _ []byte) (interface{}, error) {
|
||||
return claim.GetLastUpdate()
|
||||
}
|
||||
|
||||
type ClaimExported struct {
|
||||
Id int64 `json:"id"`
|
||||
Subject string `json:"subject"`
|
||||
|
|
|
|||
Reference in a new issue