@@ -18,47 +18,46 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1818SOFTWARE.
1919*/
2020
21- namespace TimePlanning . Pn . Controllers
21+ namespace TimePlanning . Pn . Controllers ;
22+
23+ using System . Collections . Generic ;
24+ using System . Threading . Tasks ;
25+ using Infrastructure . Models . Planning ;
26+ using Microsoft . AspNetCore . Mvc ;
27+ using Microting . eFormApi . BasePn . Infrastructure . Models . API ;
28+ using Services . TimePlanningPlanningService ;
29+
30+ [ Route ( "api/time-planning-pn/plannings" ) ]
31+ public class TimePlanningPlanningController ( ITimePlanningPlanningService planningService ) : Controller
2232{
23- using System . Collections . Generic ;
24- using System . Threading . Tasks ;
25- using Infrastructure . Models . Planning ;
26- using Microsoft . AspNetCore . Mvc ;
27- using Microting . eFormApi . BasePn . Infrastructure . Models . API ;
28- using Services . TimePlanningPlanningService ;
33+ private readonly ITimePlanningPlanningService _planningService = planningService ;
2934
30- [ Route ( "api/time-planning-pn/plannings" ) ]
31- public class TimePlanningPlanningController ( ITimePlanningPlanningService planningService ) : Controller
35+ [ HttpPost ]
36+ [ Route ( "index" ) ]
37+ public async Task < OperationDataResult < List < TimePlanningPlanningModel > > > Index (
38+ [ FromBody ] TimePlanningPlanningRequestModel model )
3239 {
33- private readonly ITimePlanningPlanningService _planningService = planningService ;
34-
35- [ HttpPost ]
36- [ Route ( "index" ) ]
37- public async Task < OperationDataResult < List < TimePlanningPlanningModel > > > Index (
38- [ FromBody ] TimePlanningPlanningRequestModel model )
39- {
40- return await _planningService . Index ( model ) ;
41- }
40+ return await _planningService . Index ( model ) ;
41+ }
4242
43- [ HttpPut ]
44- [ Route ( "{id}" ) ]
45- public async Task < OperationResult > Update ( int id , [ FromBody ] TimePlanningPlanningPrDayModel model )
46- {
47- return await _planningService . Update ( id , model ) ;
48- }
43+ [ HttpPut ]
44+ [ Route ( "{id}" ) ]
45+ public async Task < OperationResult > Update ( int id , [ FromBody ] TimePlanningPlanningPrDayModel model )
46+ {
47+ return await _planningService . Update ( id , model ) ;
48+ }
4949
50- [ HttpPut ]
51- [ Route ( "update-by-current-user" ) ]
52- public async Task < OperationResult > UpdateByCurrentUserNam ( [ FromBody ] TimePlanningPlanningPrDayModel model )
53- {
54- return await _planningService . UpdateByCurrentUserNam ( model ) ;
55- }
50+ [ HttpPut ]
51+ [ Route ( "update-by-current-user" ) ]
52+ public async Task < OperationResult > UpdateByCurrentUserNam ( [ FromBody ] TimePlanningPlanningPrDayModel model )
53+ {
54+ return await _planningService . UpdateByCurrentUserNam ( model ) ;
55+ }
5656
57- [ HttpGet ]
58- [ Route ( "get-by-user" ) ]
59- public async Task < OperationDataResult < TimePlanningPlanningModel > > IndexByCurrentUserNam ( TimePlanningPlanningRequestModel obj , string ? softwareVersion , string ? model , string ? manufacturer , string ? osVersion )
60- {
61- return await _planningService . IndexByCurrentUserNam ( obj , softwareVersion , model , manufacturer , osVersion ) ;
62- }
57+ [ HttpGet ]
58+ [ Route ( "get-by-user" ) ]
59+ public async Task < OperationDataResult < TimePlanningPlanningModel > > IndexByCurrentUserNam ( TimePlanningPlanningRequestModel obj , string ? softwareVersion , string ? model , string ? manufacturer , string ? osVersion )
60+ {
61+ return await _planningService . IndexByCurrentUserName ( obj , softwareVersion , model , manufacturer , osVersion ) ;
6362 }
6463}
0 commit comments