databrary-1: Databrary

Safe HaskellNone
LanguageHaskell2010

Controller.Slot

Synopsis

Documentation

getSlot Source #

Arguments

:: Permission

Requested permission

-> Id Slot

Slot to look up

-> Handler Slot

The slot, as requested (or a short-circuited error response)

Convert a Slot into HTTP error responses if the lookup fails or is denied.

NOTE: Intentionally implemented exactly like getVolume. Implementations should be collected in a single module and merged.

getVolumeSlot Source #

Arguments

:: Id Volume

Associated Volume

-> Permission

Requested permission

-> Id Slot

Slot to look up

-> Handler Slot

The slot, as requested (or a short-circuited error response)

Look up a Slot and confirm that it is associated with the given Volume.

This method exists, presumably, so that we can construct urls like volume:volIdslot/:slotId and make sure there's no funny business going on.

viewSlot :: Bool -> ActionRoute (API, (Maybe (Id Volume), Id Slot)) Source #

thumbSlot :: ActionRoute (Maybe (Id Volume), Id Slot) Source #