22using Learn . Server . Data . Exceptions ;
33using Learn . Server . Data . Repositories ;
44using Learn . Server . Shared ;
5- using Learn . WebApp . Shared ;
65using Learn . WebApp . Shared . Conflict ;
76using Learn . WebApp . Shared . CoursePath ;
87using Microsoft . AspNetCore . Mvc ;
@@ -36,15 +35,15 @@ public CoursePathController(ILogger<CoursePathController> logger, ICoursePathRep
3635 }
3736
3837 [ HttpGet ]
39- public async Task < ActionResult < IEnumerable < CoursePathApiModel > > > GetAllAsync ( CancellationToken cancellationToken )
38+ public async Task < ActionResult < IEnumerable < CoursePathResponseModel > > > GetAllAsync ( CancellationToken cancellationToken )
4039 {
4140 var result = await _repository . GetAllAsync ( cancellationToken ) . ConfigureAwait ( false ) ;
4241
43- return Ok ( _mapper . Map < IEnumerable < CoursePathApiModel > > ( result ) ) ;
42+ return Ok ( _mapper . Map < IEnumerable < CoursePathResponseModel > > ( result ) ) ;
4443 }
4544
4645 [ HttpGet ( "{key}" ) ]
47- public async Task < ActionResult < CoursePathApiModel > > GetAsync ( [ FromRoute , Required ] Guid key )
46+ public async Task < ActionResult < CoursePathResponseModel > > GetAsync ( [ FromRoute , Required ] Guid key )
4847 {
4948 // get the cached entity
5049 var result = await _factory . GetCoursePathGrain ( key ) . GetAsync ( ) . ConfigureAwait ( false ) ;
@@ -53,12 +52,12 @@ public async Task<ActionResult<CoursePathApiModel>> GetAsync([FromRoute, Require
5352 if ( result is null ) return NotFound ( ) ;
5453
5554 // the entity exists
56- return Ok ( _mapper . Map < CoursePathApiModel > ( result ) ) ;
55+ return Ok ( _mapper . Map < CoursePathResponseModel > ( result ) ) ;
5756 }
5857
5958 [ HttpPost ]
6059 [ SwaggerResponse ( 409 , Type = typeof ( ConflictApiResponseModel ) ) ]
61- public async Task < ActionResult < CoursePathApiModel > > PostAsync ( [ FromBody , Required , DisallowNull ] CoursePathApiModel input )
60+ public async Task < ActionResult < CoursePathResponseModel > > PostAsync ( [ FromBody , Required , DisallowNull ] CoursePathPostRequestModel input )
6261 {
6362 // to keep the compiler happy
6463 if ( input is null ) return BadRequest ( ) ;
@@ -115,7 +114,7 @@ public async Task<ActionResult<CoursePathApiModel>> PostAsync([FromBody, Require
115114 } ) ;
116115 }
117116
118- return Ok ( _mapper . Map < CoursePathApiModel > ( result ) ) ;
117+ return Ok ( _mapper . Map < CoursePathResponseModel > ( result ) ) ;
119118 }
120119
121120 [ HttpDelete ]
0 commit comments