Introduce middleware for parsing ID from URI

This commit is contained in:
eikendev 2020-08-02 17:06:11 +02:00
parent e1cd2d2f8e
commit 018ce2e537
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694
8 changed files with 74 additions and 50 deletions

View file

@ -14,17 +14,7 @@ type CreateApplication struct {
Name string `form:"name" query:"name" json:"name" binding:"required"`
}
type applicationIdentification struct {
ID uint `uri:"id" binding:"required"`
}
// DeleteApplication is used to process queries for deleting applications.
type DeleteApplication struct {
applicationIdentification
}
// UpdateApplication is used to process queries for updating applications.
type UpdateApplication struct {
applicationIdentification
Name string `json:"name"`
}