Skip to content

Commit

Permalink
Merge pull request #35 from SV-Winter-BootCamp-Team-C/fix/#34
Browse files Browse the repository at this point in the history
fix: api 수정
  • Loading branch information
Jade9846 committed Jan 19, 2024
2 parents 3776d12 + af48fcb commit 402d1ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/controller/answerReadByuserId.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { Survey, User, Question, Answer, Choice } = require('../models');
const getAnswerByuserId = async (req, res) => {
try {
const { userId, surveyId } = req.params;
const user = await Survey.findByPk(userId);
const user = await User.findByPk(userId);
if (!user) {
return res.status(400).json({ message: 'User not found' });
}
Expand Down
2 changes: 1 addition & 1 deletion backend/controller/getImageBySearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const PEXELS_API_KEY = process.env.PEXELS_API_KEY;
// 이미지 검색 API 라우트
const getImageByAPI = async (req, res) => {
try {
const perPage = req.query.perPage || '5';
const perPage = req.query.perPage || 6;
const response = await axios.get(
`https://api.pexels.com/v1/search?query=${req.params.query}&per_page=${perPage}&locale=ko-KR`,
{
Expand Down
2 changes: 1 addition & 1 deletion backend/swagger/swaggerconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ paths:
name: perPage
schema:
type: string
default: '5'
default: '6'
description: 페이지 당 이미지 수 설정
responses:
'200':
Expand Down

0 comments on commit 402d1ca

Please sign in to comment.