-handleGetEntity :: Environment -> Page -> Resource ()
-handleGetEntity env page
- = do let lastMod = toClockTime $ pageLastMod page
-
- case pageRevision page of
- Nothing -> foundTimeStamp lastMod
- Just rev -> foundEntity (strongETag $ show rev) lastMod
+handleGetEntity :: Page -> Resource ()
+handleGetEntity page
+ = do case entityRevision page of
+ 0 -> foundTimeStamp (entityLastMod page) -- 0 はデフォルトページ
+ rev -> foundEntity (strongETag $ show rev) (entityLastMod page)