fix(tokens): fixing token encoding
Giving up on doing any kind of base64 encoding on the tokens
This commit is contained in:
parent
cb33107618
commit
8eaad5b765
1 changed files with 3 additions and 6 deletions
|
|
@ -143,11 +143,11 @@ impl QueryToken {
|
|||
impl Display for QueryToken {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
let suffix = if !self.value.is_empty() {
|
||||
format!(":{}", encode(&self.value))
|
||||
format!(":{}", &self.value)
|
||||
} else {
|
||||
"".to_string()
|
||||
};
|
||||
write!(f, "{}{}", encode(&self.key), suffix)
|
||||
write!(f, "{}{}", &self.key, suffix)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -609,9 +609,6 @@ mod tests {
|
|||
QueryToken::sort(PostSortToken::Random),
|
||||
];
|
||||
|
||||
assert_eq!(
|
||||
query_vec.to_query_string(),
|
||||
"comment-count%3A1%20sort%3Arandom"
|
||||
);
|
||||
assert_eq!(query_vec.to_query_string(), "comment-count:1 sort:random");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue