Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bwinf
medal
Commits
67629a1b
Commit
67629a1b
authored
Aug 10, 2020
by
Robert Czechowski
Browse files
Dump list of participations to profile template (unfiltered)
parent
70d9e537
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core.rs
View file @
67629a1b
...
...
@@ -872,6 +872,10 @@ pub fn show_profile<T: MedalConnection>(conn: &T, session_token: &str, user_id:
}
}
}
// TODO: Needs to be filtered
let
participations
:
Vec
<
(
i32
,
String
)
>
=
conn
.get_all_participations_complete
(
session
.id
)
.into_iter
()
.map
(|(
_participation
,
contest
)|
(
contest
.id
.unwrap
(),
contest
.name
))
.collect
();
data
.insert
(
"ownparticipations"
.into
(),
to_json
(
&
participations
));
}
Some
(
user_id
)
=>
{
// TODO: Add test to check if this access restriction works
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment