added logs to db function
This commit is contained in:
parent
520b8b4b5a
commit
4f208c8ec5
@ -449,10 +449,15 @@ pub fn get_animation(name: &str, db: &State<DBPool>) -> Result<Option<Animation>
|
||||
})?
|
||||
.next();
|
||||
|
||||
println!("got here 1");
|
||||
|
||||
if next.is_none() {
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
|
||||
println!("got here 2");
|
||||
|
||||
let mut animation = next.unwrap()?;
|
||||
|
||||
struct KeyFrameId {
|
||||
@ -463,6 +468,8 @@ pub fn get_animation(name: &str, db: &State<DBPool>) -> Result<Option<Animation>
|
||||
let mut stmt =
|
||||
conn.prepare("SELECT id, duration from keyframe where animation=?1 order by i asc")?;
|
||||
|
||||
println!("got here 3");
|
||||
|
||||
let mut map = stmt.query_map([animation.id], |row| {
|
||||
Ok(KeyFrameId {
|
||||
id: row.get(0)?,
|
||||
@ -473,6 +480,9 @@ pub fn get_animation(name: &str, db: &State<DBPool>) -> Result<Option<Animation>
|
||||
})
|
||||
})?;
|
||||
|
||||
|
||||
println!("got here 4");
|
||||
|
||||
while let Some(key_frame_id) = map.next() {
|
||||
let mut key_frame_id = key_frame_id?;
|
||||
|
||||
@ -494,9 +504,14 @@ pub fn get_animation(name: &str, db: &State<DBPool>) -> Result<Option<Animation>
|
||||
key_frame_id.keyframe.settings.push(light_setting?);
|
||||
}
|
||||
|
||||
println!("loop stuff");
|
||||
|
||||
animation.animation.key_frames.push(key_frame_id.keyframe);
|
||||
}
|
||||
|
||||
|
||||
println!("got here 6");
|
||||
|
||||
Ok(Some(animation.animation))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user