diff --git a/responses/health.go b/responses/health.go index 854279d..1edf34a 100644 --- a/responses/health.go +++ b/responses/health.go @@ -1,5 +1,7 @@ package responses +import "codeberg.org/vlbeaudoin/voki/response" + type GetHealthResponse struct { - Response + response.ResponseWithError } diff --git a/responses/post.go b/responses/post.go index 91eef96..cfb03af 100644 --- a/responses/post.go +++ b/responses/post.go @@ -1,14 +1,16 @@ package responses +import "codeberg.org/vlbeaudoin/voki/response" + type PostMembresResponse struct { - Response + response.ResponseWithError Data struct { MembresInserted int64 } } type PostProgrammesResponse struct { - Response + response.ResponseWithError Data struct { ProgrammesInserted int64 } diff --git a/responses/root.go b/responses/root.go deleted file mode 100644 index 0f0bcce..0000000 --- a/responses/root.go +++ /dev/null @@ -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 -}