Additional changes to prev. commit

This commit is contained in:
Daniel Szabo 2022-06-04 22:21:22 +01:00
parent fe013d9d85
commit ff921dc103
2 changed files with 5 additions and 3 deletions

View file

@ -54,7 +54,7 @@ pub async fn redirecturl(data: web::Data<AppState>, id: web::Path<String>) -> Ht
for pasta in pastas.iter() {
if pasta.id == id {
if pasta.pasta_type == "url" {
return HttpResponse::Ok()
return HttpResponse::Found()
.append_header(("Location", String::from(&pasta.content)))
.finish();
} else {