add org structure

This commit is contained in:
andrusyakka
2023-07-05 18:44:22 +03:00
parent ac08cceda0
commit 9234b577bb
8 changed files with 57 additions and 11 deletions

10
main.go
View File

@@ -40,6 +40,8 @@ func main() {
e.DELETE("/users/:id", users.DeleteUser)
e.PATCH("/users/:id", users.UpdateUser)
e.GET("/organizations", users.GetOrganizations)
// Store
store_g := e.Group("/store")
store_g.GET("/*", store.GetFileFromStore)
@@ -48,5 +50,11 @@ func main() {
}
func checkAuth(c echo.Context) error {
return c.HTML(http.StatusOK, c.Request().Header.Get("UserId"))
result := c.Request().Header.Get("UserId") + ", " +
c.Request().Header.Get("UserRole") + ", " +
c.Request().Header.Get("UserOrganizationId") + ", " +
c.Request().Header.Get("UserRightMask") + ", " +
c.Request().Header.Get("UserPosition")
return c.HTML(http.StatusOK, result)
}