Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package routes |
||
2 | |||
3 | import ( |
||
4 | "memnixrest/app/controllers" |
||
5 | |||
6 | "github.com/gofiber/fiber/v2" |
||
7 | ) |
||
8 | |||
9 | func registerCardRoutes(r fiber.Router) { |
||
10 | // Get |
||
11 | r.Get("/cards", controllers.GetAllCards) // Get all cards |
||
12 | r.Get("/cards/id/:id", controllers.GetCardByID) // Get card by ID |
||
13 | r.Get("/cards/deck/:deckID", controllers.GetCardsFromDeck) // Get card by deckID |
||
14 | |||
15 | r.Get("/cards/today", controllers.GetTodayCard) // Get Today card |
||
16 | r.Get("/cards/next", controllers.GetNextCard) // Get Next card |
||
17 | |||
18 | // Post |
||
19 | r.Post("/cards/new", controllers.CreateNewCard) // Create a new deck |
||
20 | r.Post("/cards/response", controllers.PostResponse) // Post a response |
||
21 | } |
||
22 |