Format code

This commit is contained in:
Quentin de Quelen 2019-11-20 14:12:12 +01:00
parent 878dd6912e
commit 530738cfe9
2 changed files with 6 additions and 2 deletions

View File

@ -51,7 +51,7 @@ impl Main {
pub fn created_at(self, reader: &heed::RoTxn) -> ZResult<Option<DateTime<Utc>>> { pub fn created_at(self, reader: &heed::RoTxn) -> ZResult<Option<DateTime<Utc>>> {
self.main.get::<Str, SerdeDatetime>(reader, CREATED_AT) self.main.get::<Str, SerdeDatetime>(reader, CREATED_AT)
} }
pub fn put_updated_at(self, writer: &mut heed::RwTxn) -> ZResult<()> { pub fn put_updated_at(self, writer: &mut heed::RwTxn) -> ZResult<()> {
self.main self.main
.put::<Str, SerdeDatetime>(writer, UPDATED_AT, &Utc::now()) .put::<Str, SerdeDatetime>(writer, UPDATED_AT, &Utc::now())

View File

@ -60,7 +60,11 @@ pub fn load_routes(app: &mut tide::App<Data>) {
}); });
router.at("/synonym").nest(|router| { router.at("/synonym").nest(|router| {
router.at("/").get(synonym::list).post(synonym::create).delete(synonym::clear); router
.at("/")
.get(synonym::list)
.post(synonym::create)
.delete(synonym::clear);
router router
.at("/:synonym") .at("/:synonym")