mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-29 23:11:02 +00:00
Create local instance user on caching if it doesn't exist
This commit is contained in:
parent
5a5c8bdac8
commit
1e67b3c13c
1 changed files with 3 additions and 2 deletions
|
@ -109,8 +109,9 @@ impl Instance {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn cache_local_instance_user(conn: &Connection) {
|
pub fn cache_local_instance_user(conn: &Connection) {
|
||||||
let user = Self::get_local_instance_user_uncached(conn)
|
let user = Self::get_local_instance_user_uncached(conn).unwrap_or_else(|_| {
|
||||||
.expect("Failed to get local instance user");
|
Self::create_local_instance_user(conn).expect("Failed to create local instance user")
|
||||||
|
});
|
||||||
LOCAL_INSTANCE_USER
|
LOCAL_INSTANCE_USER
|
||||||
.set(user)
|
.set(user)
|
||||||
.expect("Failed to set local instance user");
|
.expect("Failed to set local instance user");
|
||||||
|
|
Loading…
Reference in a new issue