added proper types to structs, return empty arrays instead of null

This commit is contained in:
slawk0
2025-02-07 23:29:03 +01:00
parent 7342c5b483
commit 68873dc44c
4 changed files with 46 additions and 44 deletions

View File

@@ -21,7 +21,7 @@ func SetupRoutes(app *fiber.App) {
auth.Get("/validate", middleware.Protected(), handlers.ValidateToken)
// Contacts group
contacts := chat.Group("/contact", middleware.Protected(), logger.New())
contacts := chat.Group("/contacts", middleware.Protected(), logger.New())
contacts.Delete("/:contactID/:conversation_id", handlers.DeleteContact)
contacts.Post("/:contactUsername", handlers.InsertContact)
contacts.Get("/", handlers.GetContacts)