Remove build_errors.txt and validate_auth.sh scripts; clean up unused imports and fix type inference issues in lms-service.
This commit is contained in:
@@ -1,620 +0,0 @@
|
||||
Checking lms-service v0.1.0 (/home/juan/dev/openccb/services/lms-service)
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers.rs:154:22
|
||||
|
|
||||
154 | let categories = sqlx::query!(
|
||||
| ______________________^
|
||||
155 | | "SELECT id, name FROM grading_categories WHERE course_id = $1 ORDER BY name",
|
||||
156 | | course_id
|
||||
157 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers.rs:163:20
|
||||
|
|
||||
163 | let students = sqlx::query!(
|
||||
| ____________________^
|
||||
164 | | r#"
|
||||
165 | | SELECT
|
||||
166 | | u.id,
|
||||
... |
|
||||
180 | | org_ctx.id
|
||||
181 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers.rs:193:27
|
||||
|
|
||||
193 | let detailed_grades = sqlx::query_as!(
|
||||
| ___________________________^
|
||||
194 | | UserCategoryGrade,
|
||||
195 | | r#"
|
||||
196 | | SELECT
|
||||
... |
|
||||
205 | | course_id
|
||||
206 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers.rs:896:24
|
||||
|
|
||||
896 | let dependencies = sqlx::query_as!(
|
||||
| ________________________^
|
||||
897 | | LessonDependency,
|
||||
898 | | r#"
|
||||
899 | | SELECT ld.*
|
||||
... |
|
||||
905 | | id
|
||||
906 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers.rs:1004:30
|
||||
|
|
||||
1004 | let unmet_dependencies = sqlx::query!(
|
||||
| ______________________________^
|
||||
1005 | | r#"
|
||||
1006 | | SELECT ld.prerequisite_lesson_id, p.title as prereq_title, ld.min_score_percentage
|
||||
1007 | | FROM lesson_dependencies ld
|
||||
... |
|
||||
1020 | | claims.sub
|
||||
1021 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers_announcements.rs:55:23
|
||||
|
|
||||
55 | let cohorts = sqlx::query!(
|
||||
| _______________________^
|
||||
56 | | "SELECT cohort_id FROM announcement_cohorts WHERE announcement_id = $1",
|
||||
57 | | a.id
|
||||
58 | | )
|
||||
| |_________^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers_peer_review.rs:21:46
|
||||
|
|
||||
21 | let existing: Option<CourseSubmission> = sqlx::query_as!(
|
||||
| ______________________________________________^
|
||||
22 | | CourseSubmission,
|
||||
23 | | "SELECT * FROM course_submissions WHERE user_id = $1 AND lesson_id = $2",
|
||||
24 | | claims.sub,
|
||||
25 | | lesson_id
|
||||
26 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers_peer_review.rs:33:23
|
||||
|
|
||||
33 | let updated = sqlx::query_as!(
|
||||
| _______________________^
|
||||
34 | | CourseSubmission,
|
||||
35 | | r#"
|
||||
36 | | UPDATE course_submissions
|
||||
... |
|
||||
43 | | lesson_id
|
||||
44 | | )
|
||||
| |_________^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers_peer_review.rs:53:22
|
||||
|
|
||||
53 | let submission = sqlx::query_as!(
|
||||
| ______________________^
|
||||
54 | | CourseSubmission,
|
||||
55 | | r#"
|
||||
56 | | INSERT INTO course_submissions (user_id, course_id, lesson_id, organization_id, content)
|
||||
... |
|
||||
64 | | payload.content
|
||||
65 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers_peer_review.rs:83:22
|
||||
|
|
||||
83 | let submission = sqlx::query_as!(
|
||||
| ______________________^
|
||||
84 | | CourseSubmission,
|
||||
85 | | r#"
|
||||
86 | | SELECT s.*
|
||||
... |
|
||||
105 | | org_ctx.id
|
||||
106 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers_peer_review.rs:122:22
|
||||
|
|
||||
122 | let submission = sqlx::query!(
|
||||
| ______________________^
|
||||
123 | | "SELECT user_id FROM course_submissions WHERE id = $1",
|
||||
124 | | payload.submission_id
|
||||
125 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers_peer_review.rs:143:20
|
||||
|
|
||||
143 | let existing = sqlx::query!(
|
||||
| ____________________^
|
||||
144 | | "SELECT id FROM peer_reviews WHERE submission_id = $1 AND reviewer_id = $2",
|
||||
145 | | payload.submission_id,
|
||||
146 | | claims.sub
|
||||
147 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers_peer_review.rs:160:18
|
||||
|
|
||||
160 | let review = sqlx::query_as!(
|
||||
| __________________^
|
||||
161 | | PeerReview,
|
||||
162 | | r#"
|
||||
163 | | INSERT INTO peer_reviews (submission_id, reviewer_id, score, feedback, organization_id)
|
||||
... |
|
||||
171 | | org_ctx.id
|
||||
172 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: error communicating with database: Connection refused (os error 111)
|
||||
--> services/lms-service/src/handlers_peer_review.rs:187:19
|
||||
|
|
||||
187 | let reviews = sqlx::query_as!(
|
||||
| ___________________^
|
||||
188 | | PeerReview,
|
||||
189 | | r#"
|
||||
190 | | SELECT pr.*
|
||||
... |
|
||||
196 | | lesson_id
|
||||
197 | | )
|
||||
| |_____^
|
||||
|
|
||||
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_as` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0412]: cannot find type `AnalyticsFilter` in module `common::models`
|
||||
--> services/lms-service/src/handlers.rs:1736:42
|
||||
|
|
||||
1736 | Query(filter): Query<common::models::AnalyticsFilter>,
|
||||
| ^^^^^^^^^^^^^^^ not found in `common::models`
|
||||
|
||||
error[E0412]: cannot find type `RecommendationResponse` in this scope
|
||||
--> services/lms-service/src/handlers.rs:1802:18
|
||||
|
|
||||
1802 | ) -> Result<Json<RecommendationResponse>, (StatusCode, String)> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
||||
|
|
||||
help: consider importing this struct
|
||||
|
|
||||
1 + use common::models::RecommendationResponse;
|
||||
|
|
||||
|
||||
error[E0412]: cannot find type `RecommendationResponse` in this scope
|
||||
--> services/lms-service/src/handlers.rs:1945:22
|
||||
|
|
||||
1945 | let ai_response: RecommendationResponse = response
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
||||
|
|
||||
help: consider importing this struct
|
||||
|
|
||||
1 + use common::models::RecommendationResponse;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find function `dangerous_insecure_decode` in crate `jsonwebtoken`
|
||||
--> services/lms-service/src/lti.rs:107:51
|
||||
|
|
||||
107 | let claims: serde_json::Value = jsonwebtoken::dangerous_insecure_decode(&payload.id_token)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `jsonwebtoken`
|
||||
|
||||
warning: unused imports: `SubmitAssignmentPayload` and `SubmitPeerReviewPayload`
|
||||
--> services/lms-service/src/handlers.rs:12:44
|
||||
|
|
||||
12 | Module, Notification, Organization, SubmitAssignmentPayload, SubmitPeerReviewPayload, User, UserResponse,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
|
||||
|
||||
warning: unused import: `crate::lti`
|
||||
--> services/lms-service/src/handlers.rs:14:5
|
||||
|
|
||||
14 | use crate::lti;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers.rs:154:22
|
||||
|
|
||||
154 | let categories = sqlx::query!(
|
||||
| ______________________^
|
||||
155 | | "SELECT id, name FROM grading_categories WHERE course_id = $1 ORDER BY name",
|
||||
156 | | course_id
|
||||
... |
|
||||
159 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers.rs:160:15
|
||||
|
|
||||
160 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
160 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers.rs:163:20
|
||||
|
|
||||
163 | let students = sqlx::query!(
|
||||
| ____________________^
|
||||
164 | | r#"
|
||||
165 | | SELECT
|
||||
166 | | u.id,
|
||||
... |
|
||||
182 | | .fetch_all(&pool)
|
||||
183 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers.rs:184:15
|
||||
|
|
||||
184 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
184 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers.rs:193:27
|
||||
|
|
||||
193 | let detailed_grades = sqlx::query_as!(
|
||||
| ___________________________^
|
||||
194 | | UserCategoryGrade,
|
||||
195 | | r#"
|
||||
196 | | SELECT
|
||||
... |
|
||||
207 | | .fetch_all(&pool)
|
||||
208 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers.rs:209:15
|
||||
|
|
||||
209 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
209 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers.rs:896:24
|
||||
|
|
||||
896 | let dependencies = sqlx::query_as!(
|
||||
| ________________________^
|
||||
897 | | LessonDependency,
|
||||
898 | | r#"
|
||||
899 | | SELECT ld.*
|
||||
... |
|
||||
907 | | .fetch_all(&pool)
|
||||
908 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers.rs:1004:30
|
||||
|
|
||||
1004 | let unmet_dependencies = sqlx::query!(
|
||||
| ______________________________^
|
||||
1005 | | r#"
|
||||
1006 | | SELECT ld.prerequisite_lesson_id, p.title as prereq_title, ld.min_score_percentage
|
||||
1007 | | FROM lesson_dependencies ld
|
||||
... |
|
||||
1022 | | .fetch_all(&pool)
|
||||
1023 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0277]: the trait bound `for<'r> DailyProgress: FromRow<'r, _>` is not satisfied
|
||||
--> services/lms-service/src/handlers.rs:1461:49
|
||||
|
|
||||
1461 | let daily_completions = sqlx::query_as::<_, common::models::DailyProgress>(
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'r> FromRow<'r, _>` is not implemented for `DailyProgress`
|
||||
|
|
||||
= help: the following other types implement trait `FromRow<'r, R>`:
|
||||
`()` implements `FromRow<'r, R>`
|
||||
`(T1, T2)` implements `FromRow<'r, R>`
|
||||
`(T1, T2, T3)` implements `FromRow<'r, R>`
|
||||
`(T1, T2, T3, T4)` implements `FromRow<'r, R>`
|
||||
`(T1, T2, T3, T4, T5)` implements `FromRow<'r, R>`
|
||||
`(T1, T2, T3, T4, T5, T6)` implements `FromRow<'r, R>`
|
||||
`(T1, T2, T3, T4, T5, T6, T7)` implements `FromRow<'r, R>`
|
||||
`(T1, T2, T3, T4, T5, T6, T7, T8)` implements `FromRow<'r, R>`
|
||||
and 58 others
|
||||
note: required by a bound in `sqlx::query_as`
|
||||
--> /home/juan/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/sqlx-core-0.8.6/src/query_as.rs:345:8
|
||||
|
|
||||
342 | pub fn query_as<'q, DB, O>(sql: &'q str) -> QueryAs<'q, DB, O, <DB as Database>::Arguments<'q>>
|
||||
| -------- required by a bound in this function
|
||||
...
|
||||
345 | O: for<'r> FromRow<'r, DB::Row>,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `query_as`
|
||||
|
||||
error[E0599]: the method `fetch_all` exists for struct `QueryAs<'_, Postgres, DailyProgress, PgArguments>`, but its trait bounds were not satisfied
|
||||
--> services/lms-service/src/handlers.rs:1476:6
|
||||
|
|
||||
1461 | let daily_completions = sqlx::query_as::<_, common::models::DailyProgress>(
|
||||
| _____________________________-
|
||||
1462 | | r#"
|
||||
1463 | | SELECT
|
||||
1464 | | TO_CHAR(created_at, 'YYYY-MM-DD') as date,
|
||||
... |
|
||||
1475 | | .bind(org_ctx.id)
|
||||
1476 | | .fetch_all(&pool)
|
||||
| | -^^^^^^^^^ method cannot be called on `QueryAs<'_, Postgres, DailyProgress, PgArguments>` due to unsatisfied trait bounds
|
||||
| |_____|
|
||||
|
|
||||
|
|
||||
::: /home/juan/dev/openccb/shared/common/src/models.rs:349:1
|
||||
|
|
||||
349 | pub struct DailyProgress {
|
||||
| ------------------------ doesn't satisfy `DailyProgress: FromRow<'r, PgRow>`
|
||||
|
|
||||
= note: the following trait bounds were not satisfied:
|
||||
`DailyProgress: FromRow<'r, PgRow>`
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers.rs:1461:29
|
||||
|
|
||||
1461 | let daily_completions = sqlx::query_as::<_, common::models::DailyProgress>(
|
||||
| _____________________________^
|
||||
1462 | | r#"
|
||||
1463 | | SELECT
|
||||
1464 | | TO_CHAR(created_at, 'YYYY-MM-DD') as date,
|
||||
... |
|
||||
1476 | | .fetch_all(&pool)
|
||||
1477 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_announcements.rs:55:23
|
||||
|
|
||||
55 | let cohorts = sqlx::query!(
|
||||
| _______________________^
|
||||
56 | | "SELECT cohort_id FROM announcement_cohorts WHERE announcement_id = $1",
|
||||
57 | | a.id
|
||||
... |
|
||||
60 | | .await
|
||||
| |______________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_announcements.rs:61:19
|
||||
|
|
||||
61 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
61 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:21:46
|
||||
|
|
||||
21 | let existing: Option<CourseSubmission> = sqlx::query_as!(
|
||||
| ______________________________________________^
|
||||
22 | | CourseSubmission,
|
||||
23 | | "SELECT * FROM course_submissions WHERE user_id = $1 AND lesson_id = $2",
|
||||
24 | | claims.sub,
|
||||
... |
|
||||
27 | | .fetch_optional(&pool)
|
||||
28 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:29:15
|
||||
|
|
||||
29 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
29 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:33:23
|
||||
|
|
||||
33 | let updated = sqlx::query_as!(
|
||||
| _______________________^
|
||||
34 | | CourseSubmission,
|
||||
35 | | r#"
|
||||
36 | | UPDATE course_submissions
|
||||
... |
|
||||
45 | | .fetch_one(&pool)
|
||||
46 | | .await
|
||||
| |______________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:47:19
|
||||
|
|
||||
47 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
47 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:53:22
|
||||
|
|
||||
53 | let submission = sqlx::query_as!(
|
||||
| ______________________^
|
||||
54 | | CourseSubmission,
|
||||
55 | | r#"
|
||||
56 | | INSERT INTO course_submissions (user_id, course_id, lesson_id, organization_id, content)
|
||||
... |
|
||||
66 | | .fetch_one(&pool)
|
||||
67 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:68:15
|
||||
|
|
||||
68 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
68 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:83:22
|
||||
|
|
||||
83 | let submission = sqlx::query_as!(
|
||||
| ______________________^
|
||||
84 | | CourseSubmission,
|
||||
85 | | r#"
|
||||
86 | | SELECT s.*
|
||||
... |
|
||||
107 | | .fetch_optional(&pool)
|
||||
108 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:109:15
|
||||
|
|
||||
109 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
109 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:122:22
|
||||
|
|
||||
122 | let submission = sqlx::query!(
|
||||
| ______________________^
|
||||
123 | | "SELECT user_id FROM course_submissions WHERE id = $1",
|
||||
124 | | payload.submission_id
|
||||
... |
|
||||
127 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:128:15
|
||||
|
|
||||
128 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
128 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:143:20
|
||||
|
|
||||
143 | let existing = sqlx::query!(
|
||||
| ____________________^
|
||||
144 | | "SELECT id FROM peer_reviews WHERE submission_id = $1 AND reviewer_id = $2",
|
||||
145 | | payload.submission_id,
|
||||
146 | | claims.sub
|
||||
147 | | )
|
||||
148 | | .fetch_optional(&pool)
|
||||
149 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:150:15
|
||||
|
|
||||
150 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
150 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:160:18
|
||||
|
|
||||
160 | let review = sqlx::query_as!(
|
||||
| __________________^
|
||||
161 | | PeerReview,
|
||||
162 | | r#"
|
||||
163 | | INSERT INTO peer_reviews (submission_id, reviewer_id, score, feedback, organization_id)
|
||||
... |
|
||||
173 | | .fetch_one(&pool)
|
||||
174 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:175:15
|
||||
|
|
||||
175 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
175 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:187:19
|
||||
|
|
||||
187 | let reviews = sqlx::query_as!(
|
||||
| ___________________^
|
||||
188 | | PeerReview,
|
||||
189 | | r#"
|
||||
190 | | SELECT pr.*
|
||||
... |
|
||||
198 | | .fetch_all(&pool)
|
||||
199 | | .await
|
||||
| |__________^ cannot infer type
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> services/lms-service/src/handlers_peer_review.rs:200:15
|
||||
|
|
||||
200 | .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ^ - type must be known at this point
|
||||
|
|
||||
help: consider giving this closure parameter an explicit type
|
||||
|
|
||||
200 | .map_err(|e: /* Type */| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?;
|
||||
| ++++++++++++
|
||||
|
||||
Some errors have detailed explanations: E0277, E0282, E0412, E0425, E0599.
|
||||
For more information about an error, try `rustc --explain E0277`.
|
||||
warning: `lms-service` (bin "lms-service") generated 2 warnings
|
||||
error: could not compile `lms-service` (bin "lms-service") due to 47 previous errors; 2 warnings emitted
|
||||
Reference in New Issue
Block a user