Migrer responses à voki/response

This commit is contained in:
Victor Lacasse-Beaudoin 2023-09-18 22:05:30 -04:00
parent eca6672746
commit 025f9d74ce
3 changed files with 7 additions and 18 deletions

View file

@ -1,5 +1,7 @@
package responses package responses
import "codeberg.org/vlbeaudoin/voki/response"
type GetHealthResponse struct { type GetHealthResponse struct {
Response response.ResponseWithError
} }

View file

@ -1,14 +1,16 @@
package responses package responses
import "codeberg.org/vlbeaudoin/voki/response"
type PostMembresResponse struct { type PostMembresResponse struct {
Response response.ResponseWithError
Data struct { Data struct {
MembresInserted int64 MembresInserted int64
} }
} }
type PostProgrammesResponse struct { type PostProgrammesResponse struct {
Response response.ResponseWithError
Data struct { Data struct {
ProgrammesInserted int64 ProgrammesInserted int64
} }

View file

@ -1,15 +0,0 @@
package responses
type Response struct {
StatusCode int
Message string
Error string
}
type Responder interface {
Respond() Responder
}
func (r Response) Respond() Responder {
return r
}