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
30bccf1c
Verified
Commit
30bccf1c
authored
5 months ago
by
Eunhak Lee
Browse files
Options
Downloads
Patches
Plain Diff
fix: response 의 구조와 맞지 않는 곳 수정
parent
772baba4
No related branches found
No related tags found
1 merge request
!21
fix: response 의 구조와 맞지 않는 곳 수정
Pipeline
#10841
passed
5 months ago
Stage: test
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/repositories/shareRepository.js
+10
-6
10 additions, 6 deletions
src/repositories/shareRepository.js
src/services/partService.js
+2
-2
2 additions, 2 deletions
src/services/partService.js
with
12 additions
and
8 deletions
src/repositories/shareRepository.js
+
10
−
6
View file @
30bccf1c
...
...
@@ -15,11 +15,15 @@ const ShareRepository = {
const
resp
=
await
pool
.
query
(
`SELECT
shares.combination_id,
users.nickname,
array(SELECT relations.part_id FROM relations WHERE relations.combination_id = shares.combination_id) as parts,
shares.created_at,
(SELECT created_at FROM combinations WHERE combinations.id = shares.combination_id) as verified_at
FROM shares
WHERE uuid=$1;`
,
LEFT JOIN combinations ON shares.combination_id = combinations.id
LEFT JOIN users ON combinations.owner_id = users.id
WHERE uuid=$1
;`
,
[
uniqueId
]
);
const
[
row
]
=
resp
.
rows
;
...
...
This diff is collapsed.
Click to expand it.
src/services/partService.js
+
2
−
2
View file @
30bccf1c
...
...
@@ -113,9 +113,9 @@ const PartService = {
async
getCombinationByUuid
(
uuid
)
{
if
(
!
uuid
)
throw
new
ReportableError
(
400
,
'
올바르지 않은 요청입니다.
'
);
const
{
combination_id
,
parts
,
created_at
,
updat
ed_at
}
=
const
{
combination_id
,
nickname
,
parts
,
created_at
,
verifi
ed_at
}
=
await
ShareRepository
.
getCombinationByUuid
(
uuid
);
return
{
combination_id
,
parts
,
created_at
,
updat
ed_at
};
return
{
combination_id
,
nickname
,
parts
,
created_at
,
verifi
ed_at
};
},
};
...
...
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