rss-reader/src/views/app/logout.rs

16 lines
412 B
Rust
Executable File

use actix_web::HttpResponse;
pub async fn logout() -> HttpResponse {
HttpResponse::Ok()
.content_type("text/html; charset=utf-8")
.body(
"<html>\
<script>\
localStorage.removeItem('user-token'); \
window.location.replace(document.location.origin);\
</script>\
</html>
",
)
}