mirror of
https://github.com/ProtonMail/go-proton-api.git
synced 2025-12-23 23:57:50 -05:00
22 lines
346 B
Go
22 lines
346 B
Go
package server
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func (s *Server) handleGetUsers() gin.HandlerFunc {
|
|
return func(c *gin.Context) {
|
|
user, err := s.b.GetUser(c.GetString("UserID"))
|
|
if err != nil {
|
|
c.AbortWithStatus(http.StatusInternalServerError)
|
|
return
|
|
}
|
|
|
|
c.JSON(http.StatusOK, gin.H{
|
|
"User": user,
|
|
})
|
|
}
|
|
}
|