mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 09:52:26 +02:00
parent
9a938dc298
commit
51578d6418
5 changed files with 48 additions and 17 deletions
|
@ -56,7 +56,7 @@ func ListLabels(ctx *context.APIContext) {
|
|||
}
|
||||
|
||||
ctx.SetTotalCountHeader(count)
|
||||
ctx.JSON(http.StatusOK, convert.ToLabelList(labels))
|
||||
ctx.JSON(http.StatusOK, convert.ToLabelList(labels, nil, ctx.Org.Organization))
|
||||
}
|
||||
|
||||
// CreateLabel create a label for a repository
|
||||
|
@ -103,7 +103,8 @@ func CreateLabel(ctx *context.APIContext) {
|
|||
ctx.Error(http.StatusInternalServerError, "NewLabel", err)
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusCreated, convert.ToLabel(label))
|
||||
|
||||
ctx.JSON(http.StatusCreated, convert.ToLabel(label, nil, ctx.Org.Organization))
|
||||
}
|
||||
|
||||
// GetLabel get label by organization and label id
|
||||
|
@ -148,7 +149,7 @@ func GetLabel(ctx *context.APIContext) {
|
|||
return
|
||||
}
|
||||
|
||||
ctx.JSON(http.StatusOK, convert.ToLabel(label))
|
||||
ctx.JSON(http.StatusOK, convert.ToLabel(label, nil, ctx.Org.Organization))
|
||||
}
|
||||
|
||||
// EditLabel modify a label for an Organization
|
||||
|
@ -212,7 +213,8 @@ func EditLabel(ctx *context.APIContext) {
|
|||
ctx.Error(http.StatusInternalServerError, "UpdateLabel", err)
|
||||
return
|
||||
}
|
||||
ctx.JSON(http.StatusOK, convert.ToLabel(label))
|
||||
|
||||
ctx.JSON(http.StatusOK, convert.ToLabel(label, nil, ctx.Org.Organization))
|
||||
}
|
||||
|
||||
// DeleteLabel delete a label for an organization
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue