commit e46fc62b78580f272e02d4fbf986f461ee099a1e
parent 3d1fc0f2e8027f729e7581b8112f0137d5216cd8
Author: Daniel GarcĂa <dani-garcia@users.noreply.github.com>
Date: Wed, 15 Aug 2018 23:02:34 +0200
Merge pull request #141 from mprasil/profile_update
Add PUT alias for profile update
Diffstat:
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs
@@ -73,6 +73,11 @@ struct ProfileData {
Name: String,
}
+#[put("/accounts/profile", data = "<data>")]
+fn put_profile(data: JsonUpcase<ProfileData>, headers: Headers, conn: DbConn) -> JsonResult {
+ post_profile(data, headers, conn)
+}
+
#[post("/accounts/profile", data = "<data>")]
fn post_profile(data: JsonUpcase<ProfileData>, headers: Headers, conn: DbConn) -> JsonResult {
let data: ProfileData = data.into_inner().data;
diff --git a/src/api/core/mod.rs b/src/api/core/mod.rs
@@ -14,6 +14,7 @@ pub fn routes() -> Vec<Route> {
routes![
register,
profile,
+ put_profile,
post_profile,
get_public_keys,
post_keys,