Commit 0f541a03 authored by Michael Yang's avatar Michael Yang
Browse files

s/ListResponseModel/ModelResponse/

parent bc3e21fd
......@@ -88,10 +88,10 @@ type PushRequest struct {
}
type ListResponse struct {
Models []ListResponseModel `json:"models"`
Models []ModelResponse `json:"models"`
}
type ListResponseModel struct {
type ModelResponse struct {
Name string `json:"name"`
ModifiedAt time.Time `json:"modified_at"`
Size int `json:"size"`
......
......@@ -365,7 +365,7 @@ func DeleteModelHandler(c *gin.Context) {
}
func ListModelsHandler(c *gin.Context) {
var models []api.ListResponseModel
var models []api.ModelResponse
fp, err := GetManifestPath()
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
......@@ -398,7 +398,7 @@ func ListModelsHandler(c *gin.Context) {
log.Printf("skipping file: %s", fp)
return nil
}
model := api.ListResponseModel{
model := api.ModelResponse{
Name: mp.GetShortTagname(),
Size: manifest.GetTotalSize(),
Digest: digest,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment