diff --git a/CHANGELOG.md b/CHANGELOG.md index ab89513aa..da235e454 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## unreleased -- Allow nested objects and arrays in JSON post for jsonb columns +- Return 404 if no records updated by PATCH +- Return range headers in PATCH +- Return PATCHed resources if header "Prefer: return=representation" +- Allow nested objects and arrays in JSON post for jsonb columns ## [0.2.8.0] - 2015-04-17 ### Added diff --git a/src/App.hs b/src/App.hs index 280cd6880..f49ac356b 100644 --- a/src/App.hs +++ b/src/App.hs @@ -39,8 +39,6 @@ import PgQuery import RangeQuery import PgStructure -import Debug.Trace - app :: Text -> BL.ByteString -> Request -> H.Tx P.Postgres s Response app v1schema reqBody req = case (path, verb) of @@ -173,7 +171,7 @@ app v1schema reqBody req = "select count(t), array_to_json(array_agg(row_to_json(t)))::character varying" V.empty True - row <- H.maybeEx $ traceShow (B.stmtTemplate patch) patch + row <- H.maybeEx patch let (queryTotal, body) = fromMaybe (0 :: Int, Just "" :: Maybe Text) row r = contentRangeH 0 (queryTotal-1) queryTotal