add tests for repository
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s

This commit is contained in:
2026-10-06 00:16:03 +02:00
parent e811fda863
commit 32f3f034eb
6 changed files with 100 additions and 0 deletions
@@ -33,6 +33,26 @@ func (handler *MediaActorHandler) List(c *gin.Context) {
c.JSON(http.StatusOK, dtos)
}
func (handler *MediaActorHandler) Get(c *gin.Context) {
id := c.Param("id")
actor, err := handler.Service.Get(c.Request.Context(), id)
if err != nil {
c.JSON(http.StatusNotFound, gin.H{"error": "sport not found"})
return
}
c.JSON(http.StatusOK, actor)
}
func (handler *MediaActorHandler) Delete(c *gin.Context) {
id := c.Param("id")
err := handler.Service.Delete(c.Request.Context(), id)
if err != nil {
c.JSON(http.StatusNotFound, gin.H{"error": "sport not found"})
return
}
c.JSON(http.StatusOK, gin.H{"ok": "true"})
}
func (handler *MediaActorHandler) ListPage(c *gin.Context) {
session := sessions.Default(c)
user := session.Get(globals.UserKey)