Add TODO comments
This commit is contained in:
		
							parent
							
								
									af5674074d
								
							
						
					
					
						commit
						451c3b5c88
					
				@ -212,6 +212,7 @@ impl Media {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let mut dest = fs::File::create(path.clone()).ok()?;
 | 
					        let mut dest = fs::File::create(path.clone()).ok()?;
 | 
				
			||||||
 | 
					        // TODO: conditional GET
 | 
				
			||||||
        if let Some(proxy) = CONFIG.proxy() {
 | 
					        if let Some(proxy) = CONFIG.proxy() {
 | 
				
			||||||
            reqwest::ClientBuilder::new().proxy(proxy.clone()).build()?
 | 
					            reqwest::ClientBuilder::new().proxy(proxy.clone()).build()?
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
@ -223,6 +224,7 @@ impl Media {
 | 
				
			|||||||
        .copy_to(&mut dest)
 | 
					        .copy_to(&mut dest)
 | 
				
			||||||
        .ok()?;
 | 
					        .ok()?;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // TODO: upsert
 | 
				
			||||||
        Media::insert(
 | 
					        Media::insert(
 | 
				
			||||||
            conn,
 | 
					            conn,
 | 
				
			||||||
            NewMedia {
 | 
					            NewMedia {
 | 
				
			||||||
 | 
				
			|||||||
@ -644,6 +644,7 @@ impl FromId<DbConn> for Post {
 | 
				
			|||||||
            .and_then(|img| Media::from_activity(conn, &img).ok().map(|m| m.id));
 | 
					            .and_then(|img| Media::from_activity(conn, &img).ok().map(|m| m.id));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let title = article.object_props.name_string()?;
 | 
					        let title = article.object_props.name_string()?;
 | 
				
			||||||
 | 
					        // TODO: upsert
 | 
				
			||||||
        let post = Post::insert(
 | 
					        let post = Post::insert(
 | 
				
			||||||
            conn,
 | 
					            conn,
 | 
				
			||||||
            NewPost {
 | 
					            NewPost {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user