new error codes, code refactor, added getMessages function
This commit is contained in:
@@ -21,9 +21,13 @@ func SetupRoutes(app *fiber.App) {
|
||||
auth.Get("/validate", middleware.Protected(), handlers.ValidateToken)
|
||||
|
||||
// Contacts group
|
||||
contacts := chat.Group("/contacts", middleware.Protected(), logger.New())
|
||||
contacts.Delete("/:contact_id/:conversation_id", handlers.DeleteContact)
|
||||
contacts.Post("/:contact_username", handlers.InsertContact)
|
||||
contacts := chat.Group("/contact", middleware.Protected(), logger.New())
|
||||
contacts.Delete("/:contactID/:conversation_id", handlers.DeleteContact)
|
||||
contacts.Post("/:contactUsername", handlers.InsertContact)
|
||||
contacts.Get("/", handlers.GetContacts)
|
||||
contacts.Get("/suggestions/:contactUsername", handlers.GetContactSuggestions)
|
||||
|
||||
// Messages group
|
||||
messages := chat.Group("/messages", middleware.Protected(), logger.New())
|
||||
messages.Get("/:conversationID", handlers.GetMessages)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user