add: service edit date + browser session ids
This commit is contained in:
parent
9aee80493f
commit
cfcc2358f4
17 changed files with 148 additions and 29 deletions
|
@ -70,6 +70,16 @@ pub struct User {
|
|||
/// used an invite code.
|
||||
#[serde(default)]
|
||||
pub was_purchased: bool,
|
||||
/// This value is updated for every **new** littleweb browser session.
|
||||
///
|
||||
/// This means the user can only have one of these sessions open at once
|
||||
/// (unless this token is stored somewhere with a way to say we already have one,
|
||||
/// but this does not happen yet).
|
||||
///
|
||||
/// Without this token, the user can still use the browser, they just cannot
|
||||
/// view pages which require authentication (all `$` routes).
|
||||
#[serde(default)]
|
||||
pub browser_session: String,
|
||||
}
|
||||
|
||||
pub type UserConnections =
|
||||
|
@ -357,6 +367,7 @@ impl User {
|
|||
achievements: Vec::new(),
|
||||
awaiting_purchase: false,
|
||||
was_purchased: false,
|
||||
browser_session: String::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ pub struct Service {
|
|||
pub owner: usize,
|
||||
pub name: String,
|
||||
pub files: Vec<ServiceFsEntry>,
|
||||
pub revision: usize,
|
||||
}
|
||||
|
||||
impl Service {
|
||||
|
@ -22,6 +23,7 @@ impl Service {
|
|||
owner,
|
||||
name,
|
||||
files: Vec::new(),
|
||||
revision: unix_epoch_timestamp(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue