mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-08-02 12:24:52 +02:00
upload page
This commit is contained in:
parent
b0b3c0f3ed
commit
a8f0d8e299
8 changed files with 171 additions and 18 deletions
11
src/main.rs
11
src/main.rs
|
|
@ -221,9 +221,16 @@ async fn logout(
|
|||
)
|
||||
}
|
||||
|
||||
async fn upload(State(_app): State<Arc<App>>, session: SessionData) -> impl IntoResponse {
|
||||
async fn upload(State(app): State<Arc<App>>, session: SessionData) -> impl IntoResponse {
|
||||
if let Some(token) = session.token() {
|
||||
render(UploadPage { key: token }, session).into_response()
|
||||
render(
|
||||
UploadPage {
|
||||
key: token.as_str(),
|
||||
api: app.api.as_str(),
|
||||
},
|
||||
session,
|
||||
)
|
||||
.into_response()
|
||||
} else {
|
||||
(
|
||||
StatusCode::FOUND,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue