diff --git a/src/Model/Token.hs b/src/Model/Token.hs index 5b67782a5..d438965a4 100644 --- a/src/Model/Token.hs +++ b/src/Model/Token.hs @@ -68,6 +68,8 @@ makeLenses_ ''BearerToken _tokenRestrictionIx :: (FromJSON a, ToJSON a, Hashable (Route site), Eq (Route site)) => Route site -> Traversal' (BearerToken site) a -- ^ Focus a singular restriction (by route) if it exists +-- +-- This /cannot/ be used to add restrictions, use `_tokenRestrictionAt` instead _tokenRestrictionIx route = _tokenRestrictions . ix route . _JSON _tokenRestrictionAt :: (FromJSON a, ToJSON a, Hashable (Route site), Eq (Route site)) => Route site -> Traversal' (BearerToken site) (Maybe a)