Skip to content

Commit e9b220c

Browse files
committed
fix: Only get data for current user
1 parent 4d60328 commit e9b220c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func main() {
7979
api.Use(middleware.AuthenticationPOSTMiddleware(verifier))
8080
{
8181
api.POST("/link", link)
82-
api.GET("/user/:uid", getUser)
82+
api.GET("/user", getUser)
8383
}
8484

8585
// Start the server

user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func getUserRequest(uid any) (map[string]any, error) {
4545
}
4646

4747
func getUser(c *gin.Context) {
48-
uid := c.Param("uid")
48+
uid, _ := c.Get("uid")
4949

5050
attrs, err := getUserRequest(uid)
5151
if err != nil {

0 commit comments

Comments
 (0)