19 lines
384 B
Go
19 lines
384 B
Go
package projects
|
|
|
|
import (
|
|
db "ttime/internal/database"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func DeleteProject(c *fiber.Ctx) error {
|
|
|
|
projectID := c.Params("projectID")
|
|
username := c.Params("username")
|
|
|
|
if err := db.GetDb(c).DeleteProject(projectID, username); err != nil {
|
|
return c.Status(500).SendString((err.Error()))
|
|
}
|
|
|
|
return c.Status(200).SendString("Project deleted")
|
|
}
|