Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hospital-service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Roshan Suvarnkar
hospital-service
Merge requests
!6
added DR update API
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Open
added DR update API
updateDRAPI
into
develop-beta
Overview
9
Commits
12
Pipelines
0
Changes
13
9 open threads
Thread options
Hide all comments
Open
added DR update API
Prathviraj Suryakant Thokal
requested to merge
updateDRAPI
into
develop-beta
3 months ago
Overview
9
Commits
12
Pipelines
0
Changes
13
9 open threads
Thread options
Hide all comments
0
0
Merge request reports
Compare
develop-beta
version 9
8c507ab5
3 months ago
version 8
92b76668
3 months ago
version 7
d27bc12c
3 months ago
version 6
b7980027
3 months ago
version 5
19537d5a
3 months ago
version 4
6c9c0185
3 months ago
version 3
29012cae
3 months ago
version 2
6884657e
3 months ago
version 1
7c5128b0
3 months ago
develop-beta (base)
and
latest version
latest version
3f3aa79b
12 commits,
3 months ago
version 9
8c507ab5
11 commits,
3 months ago
version 8
92b76668
10 commits,
3 months ago
version 7
d27bc12c
9 commits,
3 months ago
version 6
b7980027
6 commits,
3 months ago
version 5
19537d5a
5 commits,
3 months ago
version 4
6c9c0185
4 commits,
3 months ago
version 3
29012cae
3 commits,
3 months ago
version 2
6884657e
2 commits,
3 months ago
version 1
7c5128b0
1 commit,
3 months ago
13 files
+
671
−
10
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
13
src/doctors/doctors.controller.ts
0 → 100644
+
76
−
0
View file @ 3f3aa79b
Edit in single-file editor
Open in Web IDE
Hide comments on this file
/**
@file <file name>
@description <description>
@author <Your Name>
@created <YYYY-MM-DD>
**/
import
{
Controller
,
Post
,
Body
,
}
from
'
@nestjs/common
'
;
import
{
Logger
,
}
from
'
nest-common-utilities
'
;
import
{
ApiOperation
,
ApiResponse
}
from
'
@nestjs/swagger
'
;
import
{
DoctorsService
}
from
'
./doctors.service
'
;
import
{
UpdateDoctorsRequestDto
}
from
'
./dto/update-doctors-request.dto
'
;
import
{
UpdateDoctorsResponseDto
}
from
'
./dto/update-doctors-response.dto
'
;
/**
* Controller to manage doctor-related API endpoints.
*/
/**
*
*/
@
Controller
(
'
doctors
'
)
export
class
DoctorsController
{
private
logger
=
new
Logger
(
DoctorsController
.
name
);
/**
* Initializes the DoctorsController.
*
* @param doctorsService - Service for handling doctors business logic.
*/
/**
* Service for handling doctor-related API endpoints.
*
* @param doctorsService - Service providing business logic for doctor
* operations.
*/
constructor
(
private
readonly
doctorsService
:
DoctorsService
)
{}
/**
* Update doctor master based on the request parameters.
*
* @param {UpdateDoctorsRequestDto} UpdateDoctorsRequestDto - The
* data transfer object containing the information for updating doctor.
* @returns {Promise<UpdateDoctorsResponseDto>} The updated
* doctor information.
*/
/**
* Handles the HTTP POST request to update an existing doctor's details.
* Delegates the logic to the doctorsService. Returns the updated doctor
* information in the response.
*
* @param updateDoctorsRequestDto - The DTO containing doctor update data.
* @returns A promise that resolves to the updated doctor response DTO.
*/
@
Post
(
'
/update
'
)
@
ApiOperation
({
summary
:
'
Update Doctor details
'
})
@
ApiResponse
({
status
:
200
,
description
:
'
Doctor Details Updated Successfully.
'
,
Roshan Suvarnkar
@roshan.suvarnkar
3 months ago
Owner
provide type in response
Please
register
or
sign in
to reply
type
:
UpdateDoctorsResponseDto
,
})
@
ApiResponse
({
status
:
400
,
description
:
'
Bad Request.
'
})
async
updateDoctors
(
@
Body
()
updateDoctorsRequestDto
:
UpdateDoctorsRequestDto
,
):
Promise
<
UpdateDoctorsResponseDto
>
{
return
this
.
doctorsService
.
updateDoctorById
(
updateDoctorsRequestDto
);
}
}
Loading
provide type in response