Skip to content

Commit c9ef1ec

Browse files
chore: Missing function descriptions
1 parent d4d0618 commit c9ef1ec

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

app/handlers/cron_jobs.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/limanmys/render-engine/pkg/cron_jobs"
1111
)
1212

13+
// CreateCronJob creates new cron job
1314
func CreateCronJob(c *fiber.Ctx) error {
1415
// Parse payload
1516
var payload models.CronJob
@@ -56,6 +57,7 @@ func CreateCronJob(c *fiber.Ctx) error {
5657
return c.JSON("Cronjob registered successfully.")
5758
}
5859

60+
// IndexCronJobs lists all cron jobs
5961
func IndexCronJobs(c *fiber.Ctx) error {
6062
// Set empty variable for later use
6163
var cronjobs []*models.CronJob
@@ -67,6 +69,7 @@ func IndexCronJobs(c *fiber.Ctx) error {
6769
return c.JSON(cronjobs)
6870
}
6971

72+
// DeleteCronJob deletes specified cron job
7073
func DeleteCronJob(c *fiber.Ctx) error {
7174
// Parse uuid
7275
uid_, err := uuid.Parse(c.Params("id"))

app/handlers/queue.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ func NewQueueHandler() *QueueHandler {
2424
}
2525
}
2626

27+
// Create creates new queue
2728
func (h *QueueHandler) Create(c *fiber.Ctx) error {
2829
var formData map[string]string
2930
queue := &models.Queue{}
@@ -95,6 +96,7 @@ func (h *QueueHandler) Create(c *fiber.Ctx) error {
9596
return c.JSON(queue)
9697
}
9798

99+
// Index lists all queues
98100
func (h *QueueHandler) Index(c *fiber.Ctx) error {
99101
extension_id, err := uuid.Parse(c.FormValue("extension_id"))
100102
if err != nil {
@@ -116,7 +118,7 @@ func (h *QueueHandler) Index(c *fiber.Ctx) error {
116118
}
117119

118120
var queues []*models.Queue
119-
if err := h.db.Debug().Model(&models.Queue{}).
121+
if err := h.db.Model(&models.Queue{}).
120122
Where("type = ?", c.FormValue("queue_type")).
121123
Where("data->>'extension_id' = ?", extension_id).
122124
Where("data->>'server_id' = ?", server_id).
@@ -127,6 +129,7 @@ func (h *QueueHandler) Index(c *fiber.Ctx) error {
127129
return c.JSON(queues)
128130
}
129131

132+
// Delete deletes specified queue
130133
func (h *QueueHandler) Delete(c *fiber.Ctx) error {
131134
// Parse uuid
132135
uid_, err := uuid.Parse(c.Params("id"))

0 commit comments

Comments
 (0)