-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Utilize
/bookmarks/check
API Endpoint
Before adding a bookmark, use `/bookmarks/check` endpoint to check if a bookmark already exists. If it exists, update the current entry. Resolves #40. Bump dependencies.
- Loading branch information
Showing
11 changed files
with
287 additions
and
111 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ mod http; | |
mod models; | ||
mod pages; | ||
mod style; | ||
mod utils; | ||
|
||
use core::settings; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use serde_json::Value; | ||
|
||
// NOTE: I was not able to correctly parse serde_json::Value into a raw value | ||
pub fn parse_serde_json_value_to_raw_string(v: &Value) -> String { | ||
let mut parsed_string = v.to_string(); | ||
// Trim leading double quote | ||
if parsed_string.starts_with('"') { | ||
parsed_string.remove(0); | ||
} | ||
// Trim trailing double quote | ||
if parsed_string.ends_with('"') { | ||
parsed_string.pop(); | ||
} | ||
// Reset string if escaped newline provided | ||
// This can occur when clicking on a cosmic::widget::text_editor widget | ||
if parsed_string == "\\n" { | ||
parsed_string = String::new(); | ||
} | ||
// "Unescape" escaped new lines | ||
parsed_string.replace("\\n", "\n") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod json; |