fix: rename `get_wolves
` to be just for clubs/socs
This commit is contained in:
parent
9452c0ac2e
commit
04a487cd8f
3 changed files with 8 additions and 7 deletions
|
@ -523,7 +523,7 @@ pub mod get_data {
|
|||
pub email: String,
|
||||
pub expiry: String,
|
||||
}
|
||||
pub async fn get_wolves(ctx: &Context) {
|
||||
pub async fn get_wolves_cns(ctx: &Context) {
|
||||
let db_lock = {
|
||||
let data_read = ctx.data.read().await;
|
||||
data_read.get::<DataBase>().expect("Expected Database in TypeMap.").clone()
|
||||
|
@ -548,7 +548,7 @@ pub mod get_data {
|
|||
|
||||
// list of users that need to be updated for this server
|
||||
let mut user_to_update = vec![];
|
||||
for user in get_wolves_sub(&config, wolves_api).await {
|
||||
for user in get_wolves_cns_sub(&config, wolves_api).await {
|
||||
let id = user.member_id.parse::<u64>().unwrap_or_default();
|
||||
match existing.get(&(id as i64)) {
|
||||
None => {
|
||||
|
@ -594,7 +594,7 @@ pub mod get_data {
|
|||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
async fn get_wolves_sub(config: &Config, wolves_api: &str) -> Vec<WolvesResultUser> {
|
||||
async fn get_wolves_cns_sub(config: &Config, wolves_api: &str) -> Vec<WolvesResultUser> {
|
||||
if config.wolves_url.is_empty() {
|
||||
return vec![];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue