User::save() should return QueryResult instead of bool

This commit is contained in:
janost committed 2018-10-14 19:33:12 +02:00
1 parent faec050a6d
commit e985221b50
5 files changed
+47 -37

No files matched your search

+4 -2
View File
@@ -227,7 +227,9 @@ fn post_eq_domains(data: JsonUpcase<EquivDomainData>, headers: Headers, conn: Db
user.excluded_globals = to_string(&excluded_globals).unwrap_or("[]".to_string());
user.equivalent_domains = to_string(&equivalent_domains).unwrap_or("[]".to_string());
user.save(&conn);
match user.save(&conn) {
Ok(()) => Ok(()),
Err(_) => err!("Failed to save user")
}
Ok(())
}