s/ListResponseModel/ModelResponse/

This commit is contained in:
Michael Yang 2023-08-30 11:10:27 -04:00
parent bc3e21fdc6
commit 0f541a0367
2 changed files with 4 additions and 4 deletions

View file

@ -88,10 +88,10 @@ type PushRequest struct {
} }
type ListResponse struct { type ListResponse struct {
Models []ListResponseModel `json:"models"` Models []ModelResponse `json:"models"`
} }
type ListResponseModel struct { type ModelResponse struct {
Name string `json:"name"` Name string `json:"name"`
ModifiedAt time.Time `json:"modified_at"` ModifiedAt time.Time `json:"modified_at"`
Size int `json:"size"` Size int `json:"size"`

View file

@ -365,7 +365,7 @@ func DeleteModelHandler(c *gin.Context) {
} }
func ListModelsHandler(c *gin.Context) { func ListModelsHandler(c *gin.Context) {
var models []api.ListResponseModel var models []api.ModelResponse
fp, err := GetManifestPath() fp, err := GetManifestPath()
if err != nil { if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
@ -398,7 +398,7 @@ func ListModelsHandler(c *gin.Context) {
log.Printf("skipping file: %s", fp) log.Printf("skipping file: %s", fp)
return nil return nil
} }
model := api.ListResponseModel{ model := api.ModelResponse{
Name: mp.GetShortTagname(), Name: mp.GetShortTagname(),
Size: manifest.GetTotalSize(), Size: manifest.GetTotalSize(),
Digest: digest, Digest: digest,