mirror of
https://github.com/aykhans/slash-e.git
synced 2025-12-13 20:29:21 +00:00
chore: update find shortcut
This commit is contained in:
@@ -125,6 +125,10 @@ func (s *Server) registerWorkspaceRoutes(g *echo.Group) {
|
||||
return echo.NewHTTPError(http.StatusUnauthorized, "Missing user in session")
|
||||
}
|
||||
|
||||
if shortcut.Visibility == api.VisibilityPrivite && shortcut.CreatorID != userID {
|
||||
return echo.NewHTTPError(http.StatusUnauthorized, "not shortcut owner")
|
||||
}
|
||||
|
||||
workspaceUser, err := s.Store.FindWordspaceUser(ctx, &api.WorkspaceUserFind{
|
||||
WorkspaceID: &workspace.ID,
|
||||
UserID: &userID,
|
||||
|
||||
Reference in New Issue
Block a user