Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mbund committed Dec 16, 2024
1 parent 97b1118 commit 03e304a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion examples/demo/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ discord:
guild_id: 1160610137703186636
client_id: 1160076447977848945
author_role_id: 1198496803130183770
# first_blood_channel_id: 1240422645938389102
first_blood_channel_id: 1240422645938389102
support_channel_id: 1173026578385617010
verified_role_id: 1170429782270431283
ctftime:
Expand Down
2 changes: 1 addition & 1 deletion examples/standalone/challenges/loader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ categories:
color: "#a855f7"
authors:
- name: mbund
avatar: https://cdn.discordapp.com/avatars/1014305712312172595/340125dd44579b7dd380e468ce3e61a4
avatar: https://www.gravatar.com/avatar
discord_id: 1014305712312172595
- name: mbunk
avatar: https://www.gravatar.com/avatar
Expand Down
24 changes: 12 additions & 12 deletions examples/standalone/challenges/my-first-web/challenge.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
stable_id: my-first-web
name: quotes
name: my-first-web
description: |
I'm launching 🚀 my new ✨ SaaS providing quotes 📝 as an API 💪!
this is a super [cool](https://example.com) *web* challenge
[quotes.challs.pwnoh.io/quote](https://quotes.challs.pwnoh.io/quote)
flag: bctf{numb3r5_4nd_57r1n65_4r3_4mb16u0u5_1n_j5_831b8aa8cbe58ed4}
hi!
flag: flag{this_is_a_fake_flag}
category: web
author: mbund
difficulty: easy
points: dynamic
ticket_template: |
## Please describe the issue you are experiencing
## Steps to reproduce
score_type: dynamic
dynamic:
decay: 20
files:
- src: hello.py
dst: quotes.zip
dst: main.py
- url: https://upload.wikimedia.org/wikipedia/commons/1/14/Symmetries_of_square.svg
dst: quadrilaterals.svg
ticket_template: |
# Web template
healthscript: https://example.com
4 changes: 2 additions & 2 deletions rhombus/src/internal/database/libsql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1871,6 +1871,8 @@ impl<T: ?Sized + LibSQLConnection + Send + Sync> Database for T {
)
.await?;

tx.commit().await?;

let mut teams: BTreeMap<i64, ScoreboardTeam> = BTreeMap::new();
let now = chrono::Utc::now().timestamp();
while let Some(row) = db_teams.next().await? {
Expand Down Expand Up @@ -1900,8 +1902,6 @@ impl<T: ?Sized + LibSQLConnection + Send + Sync> Database for T {
.push(series_point);
}

tx.commit().await?;

Ok(Arc::new(ScoreboardInner::new(teams)))
}

Expand Down
4 changes: 2 additions & 2 deletions rhombus/src/internal/routes/scoreboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub async fn route_scoreboard(

#[derive(Deserialize)]
pub struct PageParams {
page: Option<u64>,
page: Option<usize>,
}

pub async fn route_scoreboard_division(
Expand All @@ -60,7 +60,7 @@ pub async fn route_scoreboard_division(
params: Query<PageParams>,
uri: Uri,
) -> impl IntoResponse {
let page_num = params.page.unwrap_or(1).saturating_sub(1) as usize;
let page_num = params.page.unwrap_or(1).saturating_sub(1);

let division_id = division_id.strip_suffix(".json").unwrap_or(&division_id);

Expand Down

0 comments on commit 03e304a

Please sign in to comment.