Commit Graph

56 Commits

Author SHA1 Message Date
R Tyler Croy f6c12316f1 Ensure that the Cargo.lock is used when compiling releases
Was seeing failures on deployment because there are newer crates which don't
compile out of the box
2020-10-20 10:49:16 -07:00
R Tyler Croy 9094762675
Merge pull request #3 from shaunbennett/main
Enable CORS for work in progress dotdotyew frontend
2020-10-20 08:11:22 -07:00
Shaun Bennett a5776125a0 Allow CORS in production for yew app 2020-10-19 23:24:51 -04:00
R Tyler Croy 2f4beca60a
Merge pull request #2 from shaunbennett/main
bugfix: use take() instead of slice range
2020-10-16 13:06:20 -07:00
Shaun Bennett a7989700fb bugfix: use take() instead of slice range 2020-10-16 15:47:12 -04:00
R Tyler Croy 7ad9702fa0 Tweaking the API description a bit, still not quite right
There's more work to be done on integration dredd, but this is it for now
2020-10-11 16:03:47 -07:00
R Tyler Croy 071d53a190 Pre-seed the development database with a single amazing record 2020-10-11 16:03:07 -07:00
R Tyler Croy 8e14bcd5a3
Merge pull request #1 from rtyler/actionz
Copypasta mistake
2020-10-11 15:34:04 -07:00
R Tyler Croy 074e6e0081 Copypasta mistake 2020-10-11 15:27:46 -07:00
R Tyler Croy dc81aac63d Cleanup the readme a teensy bit 2020-10-11 15:11:09 -07:00
R Tyler Croy 60aad319c4 Add a GitHub Action for CI 2020-10-11 15:06:42 -07:00
R Tyler Croy 909da58cce Add some nice apache-style logs in release mode 2020-10-11 15:05:53 -07:00
R Tyler Croy 623601e3fe Apply some limits to ensure that nobody can just stuff the database with too much junk 2020-10-11 13:40:22 -07:00
R Tyler Croy 3cc17ff598 Use a ratio of choices to dots which is "the right way" to do this, I'm told 2020-10-11 13:32:45 -07:00
R Tyler Croy 0fd94c6500 Ensure that handlebars templates are registered at app boot
This will ensure that release builds properly register their templates
2020-10-11 13:03:49 -07:00
R Tyler Croy f60487524a Bindto 0.0.0.0 to make it easier for docker 2020-10-11 12:26:44 -07:00
R Tyler Croy 4f8de277ed Actually build properly within docker >_< 2020-10-11 12:14:20 -07:00
R Tyler Croy b5a1d32898 Add the sqlx JSON file for offline building in Docker 2020-10-11 11:45:53 -07:00
R Tyler Croy 414ed530a9 Add a dockerfile which may or may not work 2020-10-11 11:27:48 -07:00
R Tyler Croy 77a39f8b9f Make the new poll creation a little prettier 2020-10-10 15:25:30 -07:00
R Tyler Croy 8187980c5e No xss plz 2020-10-10 15:05:04 -07:00
R Tyler Croy 872d8d25c5 Implement the view results page 2020-10-10 14:57:07 -07:00
R Tyler Croy c5d390b00a Implement the actual voting on a poll 👏 2020-10-10 13:53:56 -07:00
R Tyler Croy b269079714 Implement the poll voting page 2020-10-07 20:39:29 -07:00
R Tyler Croy 244ff7b4c7 Make the other pages look a little lighter than the main page 2020-10-07 20:10:02 -07:00
R Tyler Croy a0bb67d199 Refactor some code while introducing the view_poll view for starting to vote 2020-10-04 20:53:12 -07:00
R Tyler Croy c766bf96f6 Refactor the common footer into a partial 2020-10-04 20:52:38 -07:00
R Tyler Croy bc60a27c63 Allow adding more than three choices to the poll 2020-10-04 20:11:52 -07:00
R Tyler Croy bf2aaa7755 Post the form and create an actual poll
This redirects to a yet-to-exist page
2020-10-04 19:57:47 -07:00
R Tyler Croy c4d60eca26 Add a couple new views to the site 2020-10-04 15:14:03 -07:00
R Tyler Croy 6d803b5f75 Wire the index handlebar view into the route 2020-10-04 13:20:42 -07:00
R Tyler Croy 70a4a2f635 Add bootstrap 4.5.2 2020-10-04 13:20:42 -07:00
R Tyler Croy d40f8556aa Mount static/ for JS/CSS 2020-10-04 13:20:42 -07:00
R Tyler Croy eae268958e Add handlebars for some janky frontend work 2020-10-04 13:07:45 -07:00
R Tyler Croy c2fea28bb6 Make a note about the apidocs 👏 2020-09-20 20:58:26 -07:00
R Tyler Croy a5f0479986 Add script to convert the YAML for the apidocs/ 2020-09-20 20:57:32 -07:00
R Tyler Croy 2f90afe2d7 On debug builds, service the apidocs from localhost:8000/apidocs/index.html 2020-09-20 20:56:44 -07:00
R Tyler Croy cf204c6760 Make this runnable in the swagger UI 2020-09-20 20:48:58 -07:00
R Tyler Croy daf40cf8fb Convert to OpenAPISpec 3.0, didn't realize I was out of date 2020-09-20 20:45:16 -07:00
R Tyler Croy 1ce8bee5a8 Add an OpenAPI description and some overrides for debug builds to test locally
The CORS stuff allows for testing against the API with swagger-editor on my
machine but is not strictly necessary.

The `dredd.yml` is for use with Dredd (`npm i dredd`) and doesn't _currently_
pass muster
2020-09-20 20:29:48 -07:00
R Tyler Croy 43cae8a372 cargo fmt 2020-09-20 11:08:15 -07:00
R Tyler Croy a56511fb74 Re-implement the voting results endpoint as well
This concludes the re-write to sqlx, I still have lots of refactoring that I
want to do but perhaps some other time :)
2020-09-20 11:07:38 -07:00
R Tyler Croy 5d8b993ef5 Re-implement the voting endpoint, refactor out all the diesel code 2020-09-20 10:21:17 -07:00
R Tyler Croy e06f89d9b1 Implement poll creation 2020-09-20 09:50:26 -07:00
R Tyler Croy ed0425ae39 Refactoring away from diesel and cleaning up a bit, not everything works here
This only has one working end-point, the GET polls/:uuid endpoint which was a
simple proof of concept
2020-09-19 16:30:46 -07:00
R Tyler Croy 79442cdf5e Wrap all the diesel calls in a spawn_blocking since they don't seem to be async
Need to do more research on this
2020-09-19 13:23:08 -07:00
R Tyler Croy 9702cbbace Implement the API for returning results 2020-09-15 21:30:15 -07:00
R Tyler Croy f954c75dc7 Support dot voting on a given poll 2020-09-15 21:11:28 -07:00
R Tyler Croy 1e7212081c Properly insert choices on the poll create, and return them back out 2020-09-15 20:31:21 -07:00
R Tyler Croy 293420b017 Provide a composite model to send back to the API consumer
No more raw models for you!
2020-09-15 17:49:33 -07:00