mirror of https://github.com/PiyushXCoder/lupt.git
fixes
This commit is contained in:
parent
b8fc1828a1
commit
c709d78c8c
|
|
@ -74,7 +74,7 @@ async fn gif(req: HttpRequest) -> Result<HttpResponse, Error> {
|
|||
.finish();
|
||||
|
||||
|
||||
let url = format!("https://g.tenor.com/v1/search?q={}&key={}&limit=20&media_filter=tinygif", name, TENOR_API_KEY.to_owned());
|
||||
let url = format!("https://g.tenor.com/v1/search?q={}&key={}&limit=20&media_filter=tinygif", name.replace(" ", "+"), TENOR_API_KEY.to_owned());
|
||||
let response = client.get(url)
|
||||
.header("User-Agent", "actix-web/3.0")
|
||||
.send()
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@ function loadGif(query) {
|
|||
if(status == 'success') {
|
||||
data.results.forEach(function(result) {
|
||||
var gif = result.media[0].tinygif.url;
|
||||
area.append($('<button>', {class: 'button', onclick: 'sendGif("'+gif+'"); $("#gif_clip").addClass("is-hidden");'})
|
||||
area.append($('<button>', {class: 'button', onclick: 'sendGif("'+encodeURI(gif)+'"); $("#gif_clip").addClass("is-hidden");'})
|
||||
.append($('<img>', {src: gif})));
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue