jokes-bapak2/api/app/v1/routes/submit.go

18 lines
287 B
Go
Raw Normal View History

2021-08-04 02:51:22 +00:00
package routes
import (
"jokes-bapak2-api/app/v1/handler/submit"
"github.com/gofiber/fiber/v2"
)
func Submit(app *fiber.App) *fiber.App {
// Get pending submitted joke
app.Get("/submit", submit.GetSubmission)
// Add a joke
app.Post("/submit", submit.SubmitJoke)
return app
}