Steve Chávez and GitHub
ea7d747107
Accept text/plain and text/html for raw output ( #1330 )
2019-06-21 11:51:54 -05:00
Robert and Steve Chávez
33532cfbb6
Fix hlint warnings for hlint v2.1.20 ( #1320 )
...
* Apply some hlint suggestions.
* Simplify config parser (to avoid hlint error)
* Reorganize for clarity (and fix hlint error)
* Remove redundant language extension
* Reformat slice more conventionally to avoid hlint bug
* Refactor for clarity (and to avoid hlint error)
* Simplify (and avoid hlint error)
* Fix hlint complaint
2019-06-08 20:52:48 -05:00
Xavier Francisco and Steve Chávez
28b3d6cafd
Update stylish haskell config; apply all; add CI config ( #1299 )
...
* Update config default; Copy non-defaults
* Update .stylish-haskell config version to match pgrst
* Apply stylish haskell to all files
* CircleCI config
* Remove redundant import.
What is used from Network.HTTP.Types.Headers is also exported by Network.HTTP.Types.
* Grouped imports
* Show un-styled files on CircleCI failure
* Fix styling imports
* Apply adhoc standard correctly
2019-05-23 10:44:34 -05:00
Xavier Francisco and Steve Chávez
1cf54e6575
Small refactor around error responses and more tests ( #1282 )
...
* Fix #880 , Clean and consolidate error responses
* Fix #1285 , Abort on fatal errors
* Add / Detail tests
2019-05-22 09:30:33 -05:00
Xavier Francisco and Steve Chávez
553531711b
Fix wrong status 404 when PATCH request didn't change anything ( #1272 )
2019-04-19 13:50:19 -05:00
steve-chavez
1037313e77
Add comments to modules
2019-02-04 10:22:02 -05:00
Ben Gamari and Steve Chávez
e0cc4d1571
Update hasql
...
Move to hasql 1.3.
2018-09-28 08:57:26 -05:00
steve-chavez
6675821c64
Allow PUT method: UPSERT of a single row
2018-02-21 07:33:54 -05:00
steve-chavez
b9a591aecb
Add ability to map GUC to http response headers
2017-10-18 17:41:55 -05:00
steve-chavez
38de56de4a
Add ability to map raise errorcode/message to http status
2017-10-18 17:41:55 -05:00
Joe Nelson and GitHub
0ed4215a0d
Support asymmetric JWK ( #919 )
2017-08-09 08:42:00 -05:00
Steve Chávez and Joe Nelson
3e26c1a83f
Add connection retrying on startup and SIGHUP, Fix #742 ( #869 )
...
* Add connection retrying on startup and SIGHUP, Fix #742
* Ensure that only one connection worker can run at a time
* Change ConnectionError status code to 503 and add automatic connection retrying
2017-05-06 19:11:18 -05:00
Diogo Biazus and Joe Nelson
206ab163b6
Refactor error type and fix nested error message [ fix #791 ] ( #829 )
2017-03-12 22:02:13 -07:00
Steve Chávez and Joe Nelson
98438c437f
Proposal for binary output ( #802 )
2017-02-14 20:36:51 -08:00
Joe Nelson and GitHub
104a7ed4fa
Use a mime type to request singular JSON responses ( #763 )
2017-01-16 15:11:37 -08:00
Diogo Biazus and Joe Nelson
649a841ef4
Fix embeded relations error message ( #767 )
2016-12-10 11:59:17 -08:00
Diogo Biazus
654ac6e62e
Move function to conver ApiRequestError to a Http Response to the Error module.
2016-11-27 23:54:58 -05:00
Diogo Biazus and Joe Nelson
41c1cf6e01
Reduce app function ( #733 )
...
Simplify the big app function
2016-11-10 20:42:00 -08:00
Joe Nelson and GitHub
9233d90075
Read settings from config file ( #714 )
2016-10-20 08:34:57 -07:00
Joe Nelson and GitHub
1d5a0e4316
Per-route content negotiation, and OpenAPI only for root ( #693 )
...
* WIP: remove non-openapi root spec
* Refactor ContentType
Different endpoints will favor one type over another
* Permit different Accept headers per endpoint
* Lint
* Add charset to Content-Type only when used as a header
Keep it out of error messages
* Accept: */* is last resort, not first
* Changelog
* makeMimeList consistently
* Remove schema description from OPTIONS response
2016-08-19 16:07:22 -07:00
Diogo Biazus and Joe Nelson
df6cbc4afa
Protolude second movement ( #677 )
...
* Replace Prelude import for Protolude in middleware
* Remove qualifier from Text type
* Replace Prelude for Protolude, replace 'cs' for 'toS' calls, also change some name bindings
* Replace Prelude in main for Protolude. Replace error calls for panic calls. Also replace cs for toS
* Replace Prelude for Protolude
* Replace Prelude for Protolude in OpenAPI
2016-07-23 12:20:36 -07:00
Joe Nelson
e4cf1ce207
Translate raise_exception to http 400
...
Fixes #661
2016-07-06 21:48:32 -07:00
Diogo Biazus
3308012dcf
Add protolude to dependencies, include NoImplicitPrelude in default extensions and port Error module to protolude.
2016-06-29 09:25:57 -04:00
Joe Nelson
18e3c30ad8
Return proper 401/403 when access denied
...
Fixes #584
2016-05-15 00:56:47 -07:00
Ruslan Talpa
40eec0b2ff
code beautify using stylish-haskell
2016-02-29 14:53:41 +02:00
Joe Nelson
7b7babd1d1
Fix frozen tests
...
Problem found by @ruslantalpa
2016-02-22 08:41:31 -08:00
Joe Nelson
d7fe59f0b0
WIP: share server code between tests and program
...
- Share server code in Main
- Switch to hasql-pool
- Use pool in tests
- DRY up test runner
2016-02-21 12:22:18 -08:00
Joe Nelson
3844f3ee96
The app compiles but totally untested
2016-01-24 18:09:19 -08:00
Joe Nelson
d6102cc908
Use the correct Error types for hasql 0.19
2016-01-24 18:09:18 -08:00
Simone Scarduzio
b5e6a93b32
Being more specific
2016-01-21 15:21:30 +00:00
Simone Scarduzio
e7c711002a
The correct HTTP status code for integrity constraint violation is 509, fixes #469
2016-01-21 14:37:47 +00:00
calebmer
ad555986d4
Error refactors
2015-11-16 17:28:39 -05:00
Ruslan Talpa
c42832f1c5
code cleanup
2015-09-25 11:51:37 +03:00
Sridhar Ratnakumar
c3ad87ffaf
Make postgrest usable as a library
2015-05-19 23:40:39 -07:00