Skip to content

Commit

Permalink
fix: add tutorial id in get request
Browse files Browse the repository at this point in the history
  • Loading branch information
killerninjacat committed Feb 2, 2024
1 parent c6eabf0 commit ba5d91a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
14 changes: 9 additions & 5 deletions docs/spec/CodeCharacter-API.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1302,11 +1302,11 @@ paths:
description: Get a single tutorial
operationId: getCodeTutorialByNumber
parameters:
- name: codeTutorialNumber
in: path
required: true
schema:
type: integer
- name: codeTutorialNumber
in: path
required: true
schema:
type: integer
responses:
200:
description: OK
Expand Down Expand Up @@ -2041,6 +2041,9 @@ components:
description: Get the game tutorials
type: object
properties:
tutorialId:
type: integer
example: 1
tutorialName:
type: string
example: Tutorial for Spawning attacker
Expand All @@ -2052,6 +2055,7 @@ components:
tutorialCodes:
$ref: '#/components/schemas/TutorialCodeObject'
required:
- tutorialId
- tutorialName
- tutorialCodes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ import io.swagger.v3.oas.annotations.media.Schema

/**
* Get the game tutorials
* @param tutorialId
* @param tutorialName
* @param tutorialCodes
* @param tutorialType
* @param description
*/
data class TutorialsGetRequestDto(

@Schema(example = "1", required = true, description = "")
@get:JsonProperty("tutorialId", required = true) val tutorialId: kotlin.Int,

@Schema(example = "Tutorial for Spawning attacker", required = true, description = "")
@get:JsonProperty("tutorialName", required = true) val tutorialName: kotlin.String,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class CodeTutorialService(
tutorialCodes = currentTutorial.tutorial,
tutorialType = currentTutorial.tutType,
description = currentTutorial.description,
tutorialId = currentTutorial.number,
)
}
fun completeCodeTutorial(gameEntity: GameEntity, userId: UUID): CodeTutorialMatchVerdictEnum {
Expand Down

0 comments on commit ba5d91a

Please sign in to comment.