Ditch the hash field on PGP keys - the ETag will handle cache-busting, so a nice short URL for the key is fine now

This commit is contained in:
Danielle McLean 2017-10-05 21:33:44 +11:00
parent ddcca3104e
commit 2eec12a2e3
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5
3 changed files with 1 additions and 3 deletions

View file

@ -10,7 +10,6 @@ User
PgpKey
userId UserId
fingerprint Text maxlen=40
hash Text maxlen=22
UniqueFingerprint fingerprint
Site

View file

@ -26,8 +26,7 @@ prettyPgp :: PgpKey -> Text
prettyPgp = T.unwords . T.chunksOf 4 . pgpKeyFingerprint
routeFromPgp :: PgpKey -> Route App
routeFromPgp PgpKey { pgpKeyFingerprint = f, pgpKeyHash = h } =
StaticR $ StaticRoute ["pgp", h, T.takeEnd 8 f ++ ".asc"] []
routeFromPgp PgpKey { pgpKeyFingerprint = f } = staticR ["pgp", T.takeEnd 8 f ++ ".asc"]
hcard :: Entity User -> Widget
hcard (Entity userId user) = do