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
f441f5b7
Commit
f441f5b7
authored
4 months ago
by
조대희
Browse files
Options
Downloads
Patches
Plain Diff
feat: 고정/유동 스케줄 수정 (
#5
)
parent
93b5e14e
No related branches found
Branches containing commit
No related tags found
2 merge requests
!31
Develop
,
!6
[#5] Schedule 서비스 로직 개발
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/scheduleService.js
+23
-0
23 additions, 0 deletions
services/scheduleService.js
with
23 additions
and
0 deletions
services/scheduleService.js
+
23
−
0
View file @
f441f5b7
...
...
@@ -36,4 +36,27 @@ class schedulService {
}
}
/**
* 사용자 스케줄 수정
*/
async
updateSchedule
(
id
,
userId
,
updateData
)
{
try
{
const
schedule
=
await
Schedule
.
findOne
({
where
:
{
id
,
user_id
:
userId
}
});
if
(
!
schedule
)
{
throw
new
Error
(
'
schedule not found
'
);
}
// 스케줄 타입 변경하지 못하도록 update값 삭제 -> 기존값 유지
delete
updateData
.
is_fixed
;
await
schedule
.
update
(
updateData
);
return
schedule
;
}
catch
(
error
)
{
throw
new
Error
(
`Failed to update schedule:
${
error
.
message
}
`
);
}
}
}
\ No newline at end of file
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