Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
WebBack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
websystem
WebBack
Commits
ab89042f
Commit
ab89042f
authored
4 months ago
by
조대희
Browse files
Options
Downloads
Patches
Plain Diff
fix: 잘못된 코드 수정 (
#23
)
parent
ed7f0b53
Branches
Branches containing commit
No related tags found
2 merge requests
!42
[#25] 배포코드 master브랜치로 이동
,
!36
[#23] 스케줄 로직 리팩토링
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app.js
+0
-3
0 additions, 3 deletions
app.js
controllers/scheduleController.js
+5
-14
5 additions, 14 deletions
controllers/scheduleController.js
with
5 additions
and
17 deletions
app.js
+
0
−
3
View file @
ab89042f
...
...
@@ -66,9 +66,6 @@ app.use('/api/chat', chatRoutes);
const
memberRoutes
=
require
(
'
./routes/memberRoute
'
);
app
.
use
(
'
/api/member
'
,
memberRoutes
);
const
memberRoutes
=
require
(
'
./routes/performanceRoute
'
);
app
.
use
(
'
/api/performance
'
,
performanceRoutes
);
// 스케줄 클리너 초기화
initScheduleCleaner
();
...
...
This diff is collapsed.
Click to expand it.
controllers/scheduleController.js
+
5
−
14
View file @
ab89042f
...
...
@@ -23,8 +23,7 @@ class scheduleController {
async
createSchedule
(
req
,
res
)
{
try
{
return
await
performanceMonitor
.
measureAsync
(
'
createSchedule
'
,
async
()
=>
{
const
userId
=
49
;
// const userId = req.user.id;
const
userId
=
req
.
user
.
id
;
const
scheduleRequestDTO
=
new
ScheduleRequestDTO
(
req
.
body
);
const
validatedData
=
scheduleRequestDTO
.
validate
(
'
create
'
);
...
...
@@ -64,8 +63,7 @@ class scheduleController {
async
updateSchedules
(
req
,
res
)
{
try
{
return
await
performanceMonitor
.
measureAsync
(
'
updateSchedules
'
,
async
()
=>
{
// const userId = req.user.id;
const
userId
=
49
;
const
userId
=
req
.
user
.
id
;
const
scheduleRequestDTO
=
new
ScheduleRequestDTO
(
req
.
body
);
const
validatedData
=
scheduleRequestDTO
.
validate
(
'
bulk_update
'
);
...
...
@@ -108,9 +106,7 @@ class scheduleController {
async
deleteSchedules
(
req
,
res
)
{
try
{
return
await
performanceMonitor
.
measureAsync
(
'
deleteSchedules
'
,
async
()
=>
{
// const userId = req.user.id;
const
userId
=
49
;
const
userId
=
req
.
user
.
id
;
const
scheduleRequestDTO
=
new
ScheduleRequestDTO
(
req
.
body
);
const
validatedData
=
scheduleRequestDTO
.
validate
(
'
bulk_delete
'
);
...
...
@@ -141,9 +137,7 @@ class scheduleController {
async
getAllSchedules
(
req
,
res
)
{
try
{
return
await
performanceMonitor
.
measureAsync
(
'
getAllSchedules
'
,
async
()
=>
{
// const userId = req.user.id;
const
userId
=
49
;
const
userId
=
req
.
user
.
id
;
const
schedules
=
await
ScheduleService
.
getAllSchedules
(
userId
);
return
res
.
status
(
200
).
json
({
...
...
@@ -171,10 +165,7 @@ class scheduleController {
try
{
return
await
performanceMonitor
.
measureAsync
(
'
getScheduleByTimeIdx
'
,
async
()
=>
{
const
{
time_idx
}
=
req
.
params
;
// const userId = req.user.id;
const
userId
=
49
;
const
userId
=
req
.
user
.
id
;
const
scheduleRequestDTO
=
new
ScheduleRequestDTO
({
time_idx
:
parseInt
(
time_idx
,
10
)
});
const
validatedData
=
scheduleRequestDTO
.
validate
(
'
get_by_time_idx
'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment