person profile page, adding names
This commit is contained in:
@@ -86,7 +86,7 @@ impl Person {
|
||||
|
||||
pub fn get_all_names(&self, conn: &Connection) -> Result<Vec<Name>, PersonError> {
|
||||
Ok(conn
|
||||
.prepare("SELECT id, is_primary, person_id, created_by, name FROM names WHERE person_id = ?1")?
|
||||
.prepare("SELECT id, is_primary, person_id, created_by, name FROM names WHERE person_id = ?1 ORDER BY id")?
|
||||
.query_map((&self.id,), |r| {
|
||||
Ok(Name {
|
||||
id: r.get(0)?,
|
||||
|
||||
Reference in New Issue
Block a user