mirror of
https://github.com/pushbits/server.git
synced 2025-06-12 15:42:14 +02:00
Introduce middleware for parsing ID from URI
This commit is contained in:
parent
e1cd2d2f8e
commit
018ce2e537
8 changed files with 74 additions and 50 deletions
|
@ -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"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue