hyperstack-org / hyperstack-org/hyperstack

Incorrect documentation about server operations

Đang mở
#267 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
538
Fork
41
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

On this page: https://docs.hyperstack.org/dsl-isomorphic/hyper-operation#server-operations
there is this example code snippet:
```
validate { raise Hyperstack::AccessViolation unless params.acting_user.admin? }
```
That doesn't seem to work properly. One working alternative is:
```
validate { params.acting_user.admin? }
```
Another alternative:
```
validate { params.acting_user.admin? || raise Hyperstack::AccessViolation }
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.