mirror of
https://github.com/khairul169/vaulterm.git
synced 2026-09-15 17:03:30 +07:00
feat: add auth, hosts, & keychains ownership
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func Router(app *fiber.App) {
|
||||
func Router(app fiber.Router) {
|
||||
router := app.Group("/ws")
|
||||
|
||||
router.Use(func(c *fiber.Ctx) error {
|
||||
|
||||
@@ -13,7 +13,8 @@ import (
|
||||
func HandleTerm(c *websocket.Conn) {
|
||||
hostId := c.Query("hostId")
|
||||
|
||||
hostRepo := hosts.NewRepository()
|
||||
user := utils.GetUserWs(c)
|
||||
hostRepo := hosts.NewRepository(&hosts.Hosts{User: user})
|
||||
data, err := hostRepo.Get(hostId)
|
||||
|
||||
if data == nil {
|
||||
|
||||
Reference in New Issue
Block a user