hyperstack-org / hyperstack-org/hyperstack
Incorrect documentation about server operations
Aperta
- Lingua principale
- JavaScript
- Stelle
- 538
- Fork
- 41
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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 }
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.