Skip to content

Commit 9881eb5

Browse files
committed
add preferences
1 parent 25607ff commit 9881eb5

15 files changed

Lines changed: 599 additions & 121 deletions

File tree

check_output.txt

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
Checking health-bridge v0.1.0 (/Users/justin/Projects/hb)
2+
error[E0063]: missing field `consultation_preference` in initializer of `NewUser<'_>`
3+
--> src/bin/seed.rs:60:24
4+
|
5+
60 | let patient_user = NewUser {
6+
| ^^^^^^^ missing `consultation_preference`
7+
8+
error[E0063]: missing field `consultation_preference` in initializer of `NewUser<'_>`
9+
--> src/bin/seed.rs:107:22
10+
|
11+
107 | let donor_user = NewUser {
12+
| ^^^^^^^ missing `consultation_preference`
13+
14+
error[E0063]: missing field `consultation_preference` in initializer of `NewUser<'_>`
15+
--> src/bin/seed.rs:154:25
16+
|
17+
154 | let hospital_user = NewUser {
18+
| ^^^^^^^ missing `consultation_preference`
19+
20+
error[E0063]: missing field `consultation_preference` in initializer of `NewUser<'_>`
21+
--> src/bin/seed.rs:183:22
22+
|
23+
183 | let admin_user = NewUser {
24+
| ^^^^^^^ missing `consultation_preference`
25+
26+
error[E0063]: missing field `consultation_preference` in initializer of `NewUser<'_>`
27+
--> src/bin/seed.rs:212:27
28+
|
29+
212 | let specialist_user = NewUser {
30+
| ^^^^^^^ missing `consultation_preference`
31+
32+
For more information about this error, try `rustc --explain E0063`.
33+
error: could not compile `health-bridge` (bin "seed") due to 5 previous errors
34+
warning: build failed, waiting for other jobs to finish...
35+
warning: unused import: `tracing::info`
36+
--> src/handlers/specialists.rs:6:5
37+
|
38+
6 | use tracing::info;
39+
| ^^^^^^^^^^^^^
40+
|
41+
= note: `#[warn(unused_imports)]` on by default
42+
43+
warning: unused import: `crate::schema::specialists`
44+
--> src/handlers/specialists.rs:11:5
45+
|
46+
11 | use crate::schema::specialists;
47+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
48+
49+
warning: unused import: `tracing::info`
50+
--> src/handlers/patients.rs:5:5
51+
|
52+
5 | use tracing::info;
53+
| ^^^^^^^^^^^^^
54+
55+
warning: unused import: `AppointmentStatusEnum`
56+
--> src/hospitals/service.rs:629:31
57+
|
58+
629 | use crate::utils::enums::{AppointmentStatusEnum, RequestStatusTypeEnum};
59+
| ^^^^^^^^^^^^^^^^^^^^^
60+
61+
warning: unused imports: `error` and `info`
62+
--> src/hospitals/appointments.rs:4:15
63+
|
64+
4 | use tracing::{error, info};
65+
| ^^^^^ ^^^^
66+
67+
warning: unused imports: `error` and `info`
68+
--> src/hospitals/blood_requests.rs:6:15
69+
|
70+
6 | use tracing::{error, info};
71+
| ^^^^^ ^^^^
72+
73+
warning: unused imports: `State` and `StatusCode`
74+
--> src/middleware/auth.rs:2:35
75+
|
76+
2 | Extension, extract::{Request, State}, http::{StatusCode, header}, middleware::Next, response::Response
77+
| ^^^^^ ^^^^^^^^^^
78+
79+
warning: unused import: `info`
80+
--> src/middleware/auth.rs:8:15
81+
|
82+
8 | use tracing::{info};
83+
| ^^^^
84+
85+
warning: unused import: `get`
86+
--> src/routes/auth.rs:7:15
87+
|
88+
7 | routing::{get, post},
89+
| ^^^
90+
91+
warning: unused import: `delete`
92+
--> src/routes/appointments.rs:1:41
93+
|
94+
1 | use axum::{Router, routing::{get, post, delete, put}};
95+
| ^^^^^^
96+
97+
warning: unused import: `delete`
98+
--> src/routes/admin.rs:4:15
99+
|
100+
4 | routing::{delete, get, patch},
101+
| ^^^^^^
102+
103+
warning: unused import: `tracing::info`
104+
--> src/specialists/service.rs:5:5
105+
|
106+
5 | use tracing::info;
107+
| ^^^^^^^^^^^^^
108+
109+
warning: unused import: `crate::services::mail::MailService`
110+
--> src/specialists/service.rs:11:5
111+
|
112+
11 | use crate::services::mail::MailService;
113+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114+
115+
error[E0063]: missing field `consultation_preference` in initializer of `NewUser<'_>`
116+
--> src/auth/service.rs:71:20
117+
|
118+
71 | let new_user = NewUser {
119+
| ^^^^^^^ missing `consultation_preference`
120+
121+
error[E0063]: missing field `consultation_preference` in initializer of `NewUser<'_>`
122+
--> src/auth/socials.rs:43:28
123+
|
124+
43 | let new_user = NewUser {
125+
| ^^^^^^^ missing `consultation_preference`
126+
127+
warning: unused import: `diesel::prelude`
128+
--> src/handlers/specialists.rs:4:5
129+
|
130+
4 | use diesel::prelude::*;
131+
| ^^^^^^^^^^^^^^^
132+
133+
warning: unused import: `diesel::associations::HasTable`
134+
--> src/hospitals/blood_requests.rs:3:5
135+
|
136+
3 | use diesel::associations::HasTable;
137+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
138+
139+
warning: unused variable: `token`
140+
--> src/auth/service.rs:223:5
141+
|
142+
223 | token: &str,
143+
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_token`
144+
|
145+
= note: `#[warn(unused_variables)]` on by default
146+
147+
warning: unused variable: `token`
148+
--> src/auth/service.rs:239:5
149+
|
150+
239 | token: &str,
151+
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_token`
152+
153+
warning: unused variable: `update_query`
154+
--> src/hospitals/service.rs:385:13
155+
|
156+
385 | let mut update_query = diesel::update(
157+
| ^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_update_query`
158+
159+
warning: variable does not need to be mutable
160+
--> src/hospitals/service.rs:385:9
161+
|
162+
385 | let mut update_query = diesel::update(
163+
| ----^^^^^^^^^^^^
164+
| |
165+
| help: remove this `mut`
166+
|
167+
= note: `#[warn(unused_mut)]` on by default
168+
169+
warning: unused variable: `hospital_id`
170+
--> src/hospitals/appointments.rs:290:5
171+
|
172+
290 | hospital_id: Uuid,
173+
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_hospital_id`
174+
175+
warning: unused variable: `user_id`
176+
--> src/specialists/service.rs:368:5
177+
|
178+
368 | user_id: Uuid,
179+
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_user_id`
180+
181+
warning: unused variable: `user`
182+
--> src/specialists/service.rs:369:5
183+
|
184+
369 | user: &User,
185+
| ^^^^ help: if this is intentional, prefix it with an underscore: `_user`
186+
187+
warning: `health-bridge` (bin "health-bridge") generated 22 warnings
188+
error: could not compile `health-bridge` (bin "health-bridge") due to 2 previous errors; 22 warnings emitted

check_output_v2.txt

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
Blocking waiting for file lock on build directory
2+
warning: unused import: `tracing::info`
3+
--> src/handlers/specialists.rs:6:5
4+
|
5+
6 | use tracing::info;
6+
| ^^^^^^^^^^^^^
7+
|
8+
= note: `#[warn(unused_imports)]` on by default
9+
10+
warning: unused import: `crate::schema::specialists`
11+
--> src/handlers/specialists.rs:11:5
12+
|
13+
11 | use crate::schema::specialists;
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
15+
16+
warning: unused import: `tracing::info`
17+
--> src/handlers/patients.rs:5:5
18+
|
19+
5 | use tracing::info;
20+
| ^^^^^^^^^^^^^
21+
22+
warning: unused import: `AppointmentStatusEnum`
23+
--> src/hospitals/service.rs:622:31
24+
|
25+
622 | use crate::utils::enums::{AppointmentStatusEnum, RequestStatusTypeEnum};
26+
| ^^^^^^^^^^^^^^^^^^^^^
27+
28+
warning: unused imports: `error` and `info`
29+
--> src/hospitals/appointments.rs:4:15
30+
|
31+
4 | use tracing::{error, info};
32+
| ^^^^^ ^^^^
33+
34+
warning: unused imports: `error` and `info`
35+
--> src/hospitals/blood_requests.rs:6:15
36+
|
37+
6 | use tracing::{error, info};
38+
| ^^^^^ ^^^^
39+
40+
warning: unused imports: `State` and `StatusCode`
41+
--> src/middleware/auth.rs:2:35
42+
|
43+
2 | Extension, extract::{Request, State}, http::{StatusCode, header}, middleware::Next, response::Response
44+
| ^^^^^ ^^^^^^^^^^
45+
46+
warning: unused import: `info`
47+
--> src/middleware/auth.rs:8:15
48+
|
49+
8 | use tracing::{info};
50+
| ^^^^
51+
52+
warning: unused import: `get`
53+
--> src/routes/auth.rs:7:15
54+
|
55+
7 | routing::{get, post},
56+
| ^^^
57+
58+
warning: unused import: `delete`
59+
--> src/routes/appointments.rs:1:41
60+
|
61+
1 | use axum::{Router, routing::{get, post, delete, put}};
62+
| ^^^^^^
63+
64+
warning: unused import: `delete`
65+
--> src/routes/admin.rs:4:15
66+
|
67+
4 | routing::{delete, get, patch},
68+
| ^^^^^^
69+
70+
warning: unused import: `tracing::info`
71+
--> src/specialists/service.rs:5:5
72+
|
73+
5 | use tracing::info;
74+
| ^^^^^^^^^^^^^
75+
76+
warning: unused import: `crate::services::mail::MailService`
77+
--> src/specialists/service.rs:11:5
78+
|
79+
11 | use crate::services::mail::MailService;
80+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
81+
82+
warning: unused import: `diesel::prelude`
83+
--> src/handlers/specialists.rs:4:5
84+
|
85+
4 | use diesel::prelude::*;
86+
| ^^^^^^^^^^^^^^^
87+
88+
warning: unused import: `diesel::associations::HasTable`
89+
--> src/hospitals/blood_requests.rs:3:5
90+
|
91+
3 | use diesel::associations::HasTable;
92+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93+
94+
warning: unused variable: `token`
95+
--> src/auth/service.rs:224:5
96+
|
97+
224 | token: &str,
98+
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_token`
99+
|
100+
= note: `#[warn(unused_variables)]` on by default
101+
102+
warning: unused variable: `token`
103+
--> src/auth/service.rs:240:5
104+
|
105+
240 | token: &str,
106+
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_token`
107+
108+
warning: unused variable: `hospital_id`
109+
--> src/hospitals/appointments.rs:290:5
110+
|
111+
290 | hospital_id: Uuid,
112+
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_hospital_id`
113+
114+
warning: unused variable: `user_id`
115+
--> src/specialists/service.rs:368:5
116+
|
117+
368 | user_id: Uuid,
118+
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_user_id`
119+
120+
warning: unused variable: `user`
121+
--> src/specialists/service.rs:369:5
122+
|
123+
369 | user: &User,
124+
| ^^^^ help: if this is intentional, prefix it with an underscore: `_user`
125+
126+
warning: struct `PatientMeta` is never constructed
127+
--> src/admin/dtos.rs:32:12
128+
|
129+
32 | pub struct PatientMeta {
130+
| ^^^^^^^^^^^
131+
|
132+
= note: `#[warn(dead_code)]` on by default
133+
134+
warning: struct `SpecialistMeta` is never constructed
135+
--> src/admin/dtos.rs:37:12
136+
|
137+
37 | pub struct SpecialistMeta {
138+
| ^^^^^^^^^^^^^^
139+
140+
warning: struct `HospitalMeta` is never constructed
141+
--> src/admin/dtos.rs:44:12
142+
|
143+
44 | pub struct HospitalMeta {
144+
| ^^^^^^^^^^^^
145+
146+
warning: struct `PaginatedResponse` is never constructed
147+
--> src/admin/dtos.rs:51:12
148+
|
149+
51 | pub struct PaginatedResponse<T> {
150+
| ^^^^^^^^^^^^^^^^^
151+
152+
warning: struct `AdminUserFilters` is never constructed
153+
--> src/admin/dtos.rs:59:12
154+
|
155+
59 | pub struct AdminUserFilters {
156+
| ^^^^^^^^^^^^^^^^
157+
158+
warning: function `create_notification` is never used
159+
--> src/common/notifications.rs:51:8
160+
|
161+
51 | pub fn create_notification(
162+
| ^^^^^^^^^^^^^^^^^^^
163+
164+
warning: function `notify_user` is never used
165+
--> src/common/notifications.rs:246:8
166+
|
167+
246 | pub fn notify_user(
168+
| ^^^^^^^^^^^
169+
170+
warning: field `frontend_url` is never read
171+
--> src/config.rs:17:9
172+
|
173+
10 | pub struct Config {
174+
| ------ field in this struct
175+
...
176+
17 | pub frontend_url: String,
177+
| ^^^^^^^^^^^^
178+
|
179+
= note: `Config` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
180+
181+
warning: `health-bridge` (bin "health-bridge") generated 28 warnings (run `cargo fix --bin "health-bridge"` to apply 13 suggestions)
182+
Finished `dev` profile [unoptimized + debuginfo] target(s) in 23.87s

src/auth/service.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ pub fn create_user(
7979
image_url: None,
8080
password_hash: &hashed_password,
8181
role: user_role,
82+
consultation_preference: None,
8283
};
8384

8485
let user = diesel::insert_into(users)

0 commit comments

Comments
 (0)