Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
meanspec-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
MeanSpec (SCE338 2024-2 Group 1)
meanspec-backend
Commits
586827e0
Verified
Commit
586827e0
authored
6 months ago
by
Eunhak Lee
Browse files
Options
Downloads
Patches
Plain Diff
feat: uuid로 인증 조합 가져오기
parent
bf7d3007
No related branches found
No related tags found
1 merge request
!20
내 PC를 인증된 조합으로 공유하기 기능
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/routes/parts.js
+9
-0
9 additions, 0 deletions
src/routes/parts.js
src/services/partService.js
+9
-0
9 additions, 0 deletions
src/services/partService.js
with
18 additions
and
0 deletions
src/routes/parts.js
+
9
−
0
View file @
586827e0
...
...
@@ -52,4 +52,13 @@ partRouter.get(
})
);
partRouter
.
get
(
'
/combination/by-uuid/:uuid
'
,
wrapAsync
(
async
(
req
,
res
)
=>
{
const
{
uuid
}
=
req
.
params
;
const
info
=
await
PartService
.
getCombinationByUuid
(
uuid
);
return
res
.
sendResponse
(
''
,
200
,
{
...
info
});
})
);
export
default
partRouter
;
This diff is collapsed.
Click to expand it.
src/services/partService.js
+
9
−
0
View file @
586827e0
import
{
columnMapping
}
from
'
../constants/columnMapping.js
'
;
import
{
ReportableError
}
from
'
../errors.js
'
;
import
PartRepository
from
'
../repositories/partRepository.js
'
;
import
ShareRepository
from
'
../repositories/shareRepository.js
'
;
const
PartService
=
{
cleanEntity
(
entity
)
{
...
...
@@ -108,6 +109,14 @@ const PartService = {
partIds
:
combination
.
partids
,
}));
},
async
getCombinationByUuid
(
uuid
)
{
if
(
!
uuid
)
throw
new
ReportableError
(
400
,
'
올바르지 않은 요청입니다.
'
);
const
{
combination_id
,
parts
,
created_at
,
updated_at
}
=
await
ShareRepository
.
getCombinationByUuid
(
uuid
);
return
{
combination_id
,
parts
,
created_at
,
updated_at
};
},
};
export
default
PartService
;
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