Skip to content
This repository was archived by the owner on Mar 25, 2022. It is now read-only.

Commit 005465e

Browse files
committed
- Always return survey_completed == true for HIDDEN_USERS
1 parent 4b0a175 commit 005465e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/routes/user.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ pub fn submit_survey(user: guards::User, data: rocket::Data) -> Status {
7474

7575
fn survey_completed(uname: &str) -> bool {
7676
use crate::schema::users::dsl::*;
77+
78+
crate::static_data::HIDDEN_USERS.contains(&uname) ||
7779
users.filter(username.eq(uname))
7880
.select(survey)
7981
.first::<Option<String>>(&crate::database::establish_connection())

0 commit comments

Comments
 (0)