Skip to content

Commit b95ec66

Browse files
committed
feat: yes
1 parent eec1cfa commit b95ec66

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

NotEnoughUpdates-REPO

src/routes.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"skycrypt/src/api"
99
redis "skycrypt/src/db"
1010
"skycrypt/src/routes"
11+
"skycrypt/src/utility"
1112

1213
"github.com/gofiber/fiber/v2"
1314
"github.com/gofiber/fiber/v2/middleware/compress"
@@ -58,6 +59,8 @@ func SetupApplication() error {
5859

5960
if os.Getenv("FIBER_PREFORK_CHILD") == "" {
6061
fmt.Print("[SKYCRYPT] SkyCrypt initialized successfully\n")
62+
63+
utility.SendWebhook("SKYCRYPT_STARTED", "EPIC_ERROR", []byte("SkyCrypt has started successfully!"))
6164
}
6265

6366
return nil
@@ -139,4 +142,5 @@ func SetupRoutes(app *fiber.App) {
139142

140143
api.Get("/leather/:type/:color", routes.LeatherHandlers)
141144

145+
api.Get("/items", routes.ItemsHandlers)
142146
}

src/routes/items.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package routes
2+
3+
import (
4+
"skycrypt/src/constants"
5+
6+
"github.com/gofiber/fiber/v2"
7+
)
8+
9+
func ItemsHandlers(c *fiber.Ctx) error {
10+
return c.JSON(fiber.Map{
11+
"items": constants.ITEMS,
12+
})
13+
}

0 commit comments

Comments
 (0)