Fix API tag data type

This commit is contained in:
Jan Eitzinger
2022-09-16 11:21:27 +02:00
parent 705f76fa3a
commit 24f374ed36
4 changed files with 142 additions and 55 deletions

View File

@@ -112,13 +112,14 @@ type ErrorResponse struct {
Error string `json:"error"` // Error Message
}
type Tag struct {
Type string `json:"type"`
Name string `json:"name"`
}
// TagJobApiRequest model
// @Description Array of tag-objects for request payload
type TagJobApiRequest []*struct {
// Tag Name
Name string `json:"name"`
Type string `json:"type"` // Tag Type
}
type TagJobApiRequest []*Tag
func handleError(err error, statusCode int, rw http.ResponseWriter) {
log.Warnf("REST API: %s", err.Error())