Add categories to demo feeds
This commit is contained in:
parent
411cdc5890
commit
0472ae2a14
@ -1,6 +1,6 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "\n SELECT \n feed_id as \"feed_id: String\",\n name,\n url,\n user_id as \"user_id: String\",\n added_time as \"added_time: chrono::DateTime<chrono::Utc>\",\n last_checked_time as \"last_checked_time: chrono::DateTime<chrono::Utc>\",\n categorization as \"categorization: JsonValue\"\n FROM feeds\n WHERE user_id = ?\n ORDER BY added_time DESC\n ",
|
||||
"query": "\n SELECT \n feed_id as \"feed_id: String\",\n name,\n url,\n user_id as \"user_id: String\",\n added_time as \"added_time: chrono::DateTime<chrono::Utc>\",\n last_checked_time as \"last_checked_time: chrono::DateTime<chrono::Utc>\",\n categorization as \"categorization: JsonValue\"\n FROM feeds\n WHERE user_id = ?\n ORDER BY name ASC\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
@ -52,5 +52,5 @@
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "7fa0f8d0047afea873a0622bcc26d7a5f903e11d59158768c41125ad36fa4810"
|
||||
"hash": "7c3a826ac9b9105554bed433100db0435c55fca5c239b4e5f58380e14697c3a0"
|
||||
}
|
@ -46,25 +46,28 @@ pub async fn setup_demo_data(pool: &sqlx::SqlitePool) {
|
||||
.await
|
||||
.expect("Failed to create demo user");
|
||||
|
||||
let bbc_news = Feed::new(
|
||||
let mut bbc_news = Feed::new(
|
||||
"BBC News".to_string(),
|
||||
"https://feeds.bbci.co.uk/news/world/us_and_canada/rss.xml"
|
||||
.parse()
|
||||
.unwrap(),
|
||||
demo_id,
|
||||
);
|
||||
bbc_news.categorization = vec!["News".to_string()];
|
||||
|
||||
let xkcd = Feed::new(
|
||||
let mut xkcd = Feed::new(
|
||||
"XKCD".to_string(),
|
||||
"https://xkcd.com/atom.xml".parse().unwrap(),
|
||||
demo_id,
|
||||
);
|
||||
xkcd.categorization = vec!["Webcomic".to_string()];
|
||||
|
||||
let isidore = Feed::new(
|
||||
let mut isidore = Feed::new(
|
||||
"Isidore & Friends".to_string(),
|
||||
"https://isidore.webcomic.ws/rss/".parse().unwrap(),
|
||||
demo_id,
|
||||
);
|
||||
isidore.categorization = vec!["Webcomic".to_string()];
|
||||
|
||||
let feeds = [bbc_news, xkcd, isidore];
|
||||
|
||||
|
@ -130,7 +130,7 @@ pub async fn list_feeds(
|
||||
categorization as "categorization: JsonValue"
|
||||
FROM feeds
|
||||
WHERE user_id = ?
|
||||
ORDER BY added_time DESC
|
||||
ORDER BY name ASC
|
||||
"#,
|
||||
user_id
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user