mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-30 03:38:31 +00:00
simplify references to server_name
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
71a3855af6
commit
3e0ff2dc84
13 changed files with 29 additions and 26 deletions
|
@ -218,8 +218,6 @@ async fn migrate(services: &Services) -> Result<()> {
|
|||
}
|
||||
|
||||
async fn db_lt_12(services: &Services) -> Result<()> {
|
||||
let config = &services.server.config;
|
||||
|
||||
for username in &services
|
||||
.users
|
||||
.list_local_users()
|
||||
|
@ -227,7 +225,8 @@ async fn db_lt_12(services: &Services) -> Result<()> {
|
|||
.collect::<Vec<_>>()
|
||||
.await
|
||||
{
|
||||
let user = match UserId::parse_with_server_name(username.as_str(), &config.server_name) {
|
||||
let user = match UserId::parse_with_server_name(username.as_str(), &services.server.name)
|
||||
{
|
||||
| Ok(u) => u,
|
||||
| Err(e) => {
|
||||
warn!("Invalid username {username}: {e}");
|
||||
|
@ -297,8 +296,6 @@ async fn db_lt_12(services: &Services) -> Result<()> {
|
|||
}
|
||||
|
||||
async fn db_lt_13(services: &Services) -> Result<()> {
|
||||
let config = &services.server.config;
|
||||
|
||||
for username in &services
|
||||
.users
|
||||
.list_local_users()
|
||||
|
@ -306,7 +303,8 @@ async fn db_lt_13(services: &Services) -> Result<()> {
|
|||
.collect::<Vec<_>>()
|
||||
.await
|
||||
{
|
||||
let user = match UserId::parse_with_server_name(username.as_str(), &config.server_name) {
|
||||
let user = match UserId::parse_with_server_name(username.as_str(), &services.server.name)
|
||||
{
|
||||
| Ok(u) => u,
|
||||
| Err(e) => {
|
||||
warn!("Invalid username {username}: {e}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue