From 2eec12a2e3e0e3f050d549f7adbf30eff9a0ff32 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Thu, 5 Oct 2017 21:33:44 +1100 Subject: [PATCH] Ditch the hash field on PGP keys - the ETag will handle cache-busting, so a nice short URL for the key is fine now --- config/models | 1 - src/Widget/Hcard.hs | 3 +-- static/pgp/{RXDVvgKpVG2xsEnpLNjGwg => }/ACA7BABE.asc | 0 3 files changed, 1 insertion(+), 3 deletions(-) rename static/pgp/{RXDVvgKpVG2xsEnpLNjGwg => }/ACA7BABE.asc (100%) diff --git a/config/models b/config/models index 58a434d..ff73c40 100644 --- a/config/models +++ b/config/models @@ -10,7 +10,6 @@ User PgpKey userId UserId fingerprint Text maxlen=40 - hash Text maxlen=22 UniqueFingerprint fingerprint Site diff --git a/src/Widget/Hcard.hs b/src/Widget/Hcard.hs index d8881f1..80aacea 100644 --- a/src/Widget/Hcard.hs +++ b/src/Widget/Hcard.hs @@ -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 diff --git a/static/pgp/RXDVvgKpVG2xsEnpLNjGwg/ACA7BABE.asc b/static/pgp/ACA7BABE.asc similarity index 100% rename from static/pgp/RXDVvgKpVG2xsEnpLNjGwg/ACA7BABE.asc rename to static/pgp/ACA7BABE.asc