test: re-worked user repo tests
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
"git.dittmar.dev/robin/dttmr-api/internal/api/response"
|
||||
)
|
||||
|
||||
type VersionResponse struct {
|
||||
type versionResponse struct {
|
||||
Version string `json:"version"`
|
||||
Commit string `json:"commit"`
|
||||
BuildTime string `json:"buildTime"`
|
||||
@@ -19,11 +19,11 @@ type VersionResponse struct {
|
||||
// @Tags Version
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Success 200 {object} VersionResponse
|
||||
// @Success 200 {object} versionResponse
|
||||
// @Router /version [get]
|
||||
func VersionHandler(version string, commit string, buildTime string) func(http.ResponseWriter, *http.Request) {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
response.JSON(r.Context(), w, http.StatusOK, VersionResponse{
|
||||
response.JSON(r.Context(), w, http.StatusOK, versionResponse{
|
||||
Version: version,
|
||||
Commit: commit,
|
||||
BuildTime: buildTime,
|
||||
|
||||
Reference in New Issue
Block a user