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
Merge requests
!7
[
#6
] Schedule 컨트롤러, 라우터, 로직 개발
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
[
#6
] Schedule 컨트롤러, 라우터, 로직 개발
feature/#6
into
develop
Overview
0
Commits
12
Pipelines
0
Changes
1
Merged
조대희
requested to merge
feature/#6
into
develop
6 months ago
Overview
0
Commits
12
Pipelines
0
Changes
1
Expand
컨트롤러 생성
라우터 생성
유틸 함수 생성
Schedule 모델 컬럼 추가
Schedule 서비스 버그 수정
0
0
Merge request reports
Viewing commit
dc324ee1
Prev
Next
Show latest version
1 file
+
31
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
dc324ee1
feat: 스케줄 삭제 컨트롤러 (
#6
)
· dc324ee1
조대희
authored
6 months ago
controllers/scheduleController.js
+
31
−
0
Options
@@ -76,5 +76,36 @@ class scheduleController {
code
:
'
SCHEDULE_UPDATE_ERROR
'
}
});
}
}
/**
* 스케줄 삭제
* DELETE /api/schedule/:id
*/
async
deleteSchedule
(
req
,
res
)
{
try
{
const
{
id
}
=
req
.
params
;
const
userId
=
req
.
user
.
id
;
await
ScheduleService
.
deleteSchedule
(
id
,
userId
);
return
res
.
status
(
200
).
json
({
success
:
true
,
data
:
{
message
:
'
Schedule successfully deleted
'
}
});
}
catch
(
error
)
{
return
res
.
status
(
404
).
json
({
success
:
false
,
error
:
{
message
:
error
.
message
,
code
:
'
SCHEDULE_NOT_FOUND
'
}
});
}
}
}
\ No newline at end of file
Loading