Skip to content

Commit 8d3b18d

Browse files
committed
Snake-case for local exercise kinds
1 parent 95d305a commit 8d3b18d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

crates/tmc-langs-cli/bindings.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ student_file_paths: Array<string>,
3838
*/
3939
exercise_file_paths: Array<string>, }
4040

41-
export type LocalExercise = { "Tmc": LocalTmcExercise } | { "Mooc": LocalMoocExercise };
41+
export type LocalExercise = { "tmc": LocalTmcExercise } | { "mooc": LocalMoocExercise };
4242

4343
export type LocalTmcExercise = { "exercise-slug": string, "exercise-path": string, }
4444

crates/tmc-langs/src/data.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use tmc_testmycode_client::response::{CourseData, CourseDetails, CourseExercise}
1212
use uuid::Uuid;
1313

1414
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
15+
#[serde(rename_all = "snake_case")]
1516
#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))]
1617
pub enum LocalExercise {
1718
Tmc(LocalTmcExercise),

0 commit comments

Comments
 (0)