Browse Source

Use sha hashes instead of primary key

master
Dylan Baker 5 years ago
parent
commit
117cb06ca9
2 changed files with 2 additions and 1 deletions
  1. 1
    1
      src/cli.rs
  2. 1
    0
      src/client.rs

+ 1
- 1
src/cli.rs View File

@@ -44,7 +44,7 @@ pub fn new_snippet(matches: &ArgMatches) -> io::Result<()> {
44 44
 
45 45
     match create_snippet(snippet, &config) {
46 46
         Ok(resp) => match resp {
47
-            ApiResult::IncomingSnippet { id, .. } => println!("{}/snippets/{}", url, id),
47
+            ApiResult::IncomingSnippet { uuid, .. } => println!("{}/snippets/{}", url, uuid),
48 48
             ApiResult::IncomingError { message } => println!("error: {}", message),
49 49
         },
50 50
         Err(err) => println!("{}", err),

+ 1
- 0
src/client.rs View File

@@ -22,6 +22,7 @@ pub enum ApiResult {
22 22
         id: i32,
23 23
         title: String,
24 24
         body: String,
25
+        uuid: String,
25 26
         created_at: NaiveDateTime,
26 27
     },
27 28
     IncomingError {

Loading…
Cancel
Save