From 1c22088640e5deeadd61017bd90920b652685b5f Mon Sep 17 00:00:00 2001 From: Jake Swenson Date: Sun, 29 Aug 2021 12:59:04 -0700 Subject: Notion API Version 2021-08-16 support; fix a bunch of modling errors as well --- examples/todo/commands/configure.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'examples/todo/commands') diff --git a/examples/todo/commands/configure.rs b/examples/todo/commands/configure.rs index 42ffafd..18ace89 100644 --- a/examples/todo/commands/configure.rs +++ b/examples/todo/commands/configure.rs @@ -1,8 +1,9 @@ use crate::TodoConfig; use anyhow::Result; +use notion::ids::{AsIdentifier, DatabaseId}; use notion::models::search::NotionSearch; -use notion::models::{Database, DatabaseId}; -use notion::{AsIdentifier, NotionApi}; +use notion::models::Database; +use notion::NotionApi; use skim::{Skim, SkimItem, SkimItemReceiver, SkimItemSender, SkimOptions}; use std::borrow::Cow; use std::ops::Deref; @@ -43,9 +44,9 @@ fn skim_select_database(databases: Vec) -> Result { .downcast_ref() .expect("Couldn't cast back to SkimDB"); - let database_id = db.db.id(); + let database_id = db.db.as_id(); - Ok(database_id) + Ok(database_id.clone()) } pub async fn configure(notion_api: NotionApi) -> Result<()> { -- cgit v1.2.3