mirror of
https://github.com/SphericalKat/medium.rip.git
synced 2026-10-21 01:34:22 +00:00
feat: add sample response.json for dev
Signed-off-by: Sphericalkat <amolele@gmail.com>
This commit is contained in:
1 parent
9600c21c5a
commit
848cd514d0
3 files changed
+35
-3
No files matched your search
+15
-2
@@ -1,9 +1,22 @@
|
||||
package routes
|
||||
|
||||
import "github.com/gofiber/fiber/v2"
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/medium.rip/pkg/client"
|
||||
)
|
||||
|
||||
func show(c *fiber.Ctx) error {
|
||||
return nil
|
||||
postId := c.Params("id", "")
|
||||
if postId == "" {
|
||||
return c.Redirect("/")
|
||||
}
|
||||
|
||||
e, err := client.PostData(postId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.JSON(e)
|
||||
}
|
||||
|
||||
func index(c *fiber.Ctx) error {
|
||||
|
||||
Reference in new issue
Block a user