aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Don't import modules in macro.Harald Eilertsen2017-12-231-10/+5
| | | | | Didn't work well when macro was invoked more than once for each source file. Use full references to all symbols instead.
* Move get_post into impl and rename.Harald Eilertsen2017-12-232-8/+10
|
* Move get_posts function to models.Harald Eilertsen2017-12-232-11/+11
|
* Move implement_responder_for macro into crate.Harald Eilertsen2017-12-233-25/+28
| | | | | This is so we can use it in other modules too. Besides it makes things slightly cleaner.
* Move posts module to it's own source file.Harald Eilertsen2017-12-172-30/+29
|
* Move responder impl's for templates to a macro.Harald Eilertsen2017-11-221-15/+19
|
* Add handlers for creating new Posts.Harald Eilertsen2017-11-222-1/+51
|
* Derive FromForm for models::Post.Harald Eilertsen2017-11-212-1/+4
| | | | | This allows us to pass in forms that will translate into proper form objects.
* Implement default trait for Posts using derive.Harald Eilertsen2017-11-211-1/+1
|
* Use route decorators to produce different output formats.Harald Eilertsen2017-11-201-22/+21
| | | | | | This seems to be the more proper way of doing it. Also makes it much clearer which routes exists, and what formats they accept. Both in the code and in the status output.
* Use serde_json to create json response when requested by client.Harald Eilertsen2017-11-203-8/+22
|
* Implement responder for IndexTemplate.Harald Eilertsen2017-11-171-3/+15
| | | | | | | This means the actual handler just returns the template, which is then rendered by the responder for that type. Looking into making this generic so the responder can return data in other formats as well, like json or xml.
* Set correct content-type for response.Harald Eilertsen2017-11-161-2/+3
|
* Pass posts to the template and iterate over them.Harald Eilertsen2017-11-161-6/+2
|
* Add Bart templating engine.Harald Eilertsen2017-11-161-10/+15
|
* Add schema for posts, and display them on index page.Harald Eilertsen2017-10-014-4/+32
|
* Get database connection on requestHarald Eilertsen2017-10-012-1/+34
|
* Move database setup to lib.rs.Harald Eilertsen2017-10-012-28/+29
|
* Connect to database pool when igniting.Harald Eilertsen2017-10-011-1/+29
|
* Initial launch!Harald Eilertsen2017-10-011-0/+15