code stringlengths 41 34.3k | lang stringclasses 8
values | review stringlengths 1 4.74k |
|---|---|---|
@@ -19,41 +19,56 @@ export default class Repo {
}) {
this.id = id;
this.name = name;
- this.full_name = full_name;
+ this.fullName = full_name;
this.owner = owner;
- this.html_url = html_url;
+ this.htmlUrl = html_url;
this.description = description;
- this.stargazers_count = starg... | JavaScript | 그 부분은 신경쓰지 못했네요!
한국 서비스에서는 alt도 한글로 적어주는게 더 나을까요? |
@@ -1,83 +1,112 @@
import GithubApiController from "@controllers/githubController";
import User from "@models/User";
+import {
+ NO_SEARCH_RESULT_TEMPLATE,
+ SEARCH_LOADING_TEMPLATE,
+ getReposTemplate,
+ NO_REPOS_TEMPLATE,
+} from "@templates/search";
+import { SPINNER_TEMPLATE } from "@templates/spinner";
+impo... | JavaScript | 기존 vs 새로 생성은 다른 경우니까 create가 더 명확하겠네요 :) |
@@ -0,0 +1,65 @@
+import History from "@models/History";
+import {
+ getHistoryItemTemplate,
+ NO_HISTORY_TEMPLATE,
+} from "@templates/history";
+
+export default class HistoryController {
+ constructor(historyContainer) {
+ this.historyContainer = historyContainer;
+ this.numberOfHistory = 0;
+ this._init... | JavaScript | 간결한 버전도 괜찮군요 ㅎㅎ |
@@ -1,11 +1,13 @@
import Repo from "@models/Repo";
+import { getDateDiff } from "@utils/dateUtils";
export default class User {
constructor({
id,
avatar_url,
created_at,
email,
+ bio,
followers,
following,
login,
@@ -22,57 +24,114 @@ export default class User {
this.id ... | JavaScript | 객체 프로퍼티를 복사해오는 과정에서 다른 부분은 신경을 쓰지 못했네요...! 통일 시켜보겠습니다 |
@@ -19,41 +19,56 @@ export default class Repo {
}) {
this.id = id;
this.name = name;
- this.full_name = full_name;
+ this.fullName = full_name;
this.owner = owner;
- this.html_url = html_url;
+ this.htmlUrl = html_url;
this.description = description;
- this.stargazers_count = starg... | JavaScript | 넵~ 제가 지금 진행하고 있는 프로젝트의 경우 다 한글로 alt 적어주고 있습니다! |
@@ -19,41 +19,56 @@ export default class Repo {
}) {
this.id = id;
this.name = name;
- this.full_name = full_name;
+ this.fullName = full_name;
this.owner = owner;
- this.html_url = html_url;
+ this.htmlUrl = html_url;
this.description = description;
- this.stargazers_count = starg... | JavaScript | 아하! 참고해서 진행해보도록 하겠습니다~ |
@@ -1,70 +1,10 @@
-# Getting Started with Create React App
+# React Westagram 3팀
-This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
+instagram을 모티브로 한 클론 팀 프로젝트
-## Available Scripts
+# 팀원
-In the project directory, you can run:
-
-### `npm start`
-
-Runs the app... | Unknown | 👍 README.md 파일 수정해주셔서 감사합니다 ^^ |
@@ -0,0 +1,61 @@
+import React, { useState, useEffect } from "react";
+import { useNavigate } from "react-router-dom";
+import "./Login.scss";
+
+const Login = () => {
+ const navigate = useNavigate();
+ const [showErrorMessage, setShowErrorMessage] = useState(false);
+
+ const [userInfo, setUserInfo] = useState({
+... | Unknown | 더 이상 사용하지 않는 불필요한 코드에 대한 주석은 꼭 삭제해주세요 |
@@ -0,0 +1,61 @@
+import React, { useState, useEffect } from "react";
+import { useNavigate } from "react-router-dom";
+import "./Login.scss";
+
+const Login = () => {
+ const navigate = useNavigate();
+ const [showErrorMessage, setShowErrorMessage] = useState(false);
+
+ const [userInfo, setUserInfo] = useState({
+... | Unknown | 콘솔도 마찬가지입니다 테스트가 끝난 코드는 항상 지워주세요!
아래에 남아있는 모든 콘솔은 삭제 해주세요 |
@@ -0,0 +1,61 @@
+import React, { useState, useEffect } from "react";
+import { useNavigate } from "react-router-dom";
+import "./Login.scss";
+
+const Login = () => {
+ const navigate = useNavigate();
+ const [showErrorMessage, setShowErrorMessage] = useState(false);
+
+ const [userInfo, setUserInfo] = useState({
+... | Unknown | 👍 useEffect 까지 활용해보셨군요!
condition 변수가 userInfo라는 state를 이미 참조한 값이기때문에 isActive라는 값을 따로 state로 관리하지않아도
condition 변수가 참조하고있는 값이 이미 state라서 state변화에 따라 즉각적으로 다른 값을 가질 수 있습니다.
isActive를 state가 아닌 일반변수로 관리해보시는게 어떨까요? |
@@ -0,0 +1,61 @@
+import React, { useState, useEffect } from "react";
+import { useNavigate } from "react-router-dom";
+import "./Login.scss";
+
+const Login = () => {
+ const navigate = useNavigate();
+ const [showErrorMessage, setShowErrorMessage] = useState(false);
+
+ const [userInfo, setUserInfo] = useState({
+... | Unknown | 👍 조건부랜더링 활용해보셨군요!! 오히려 showErrorMessage를 관리하는 함수를 useEffect함수 내에서 선언한 condition값에 따라 다르게 관리해볼 수 있겠습니다! |
@@ -0,0 +1,144 @@
+.login {
+ width: 100%;
+ height: 100vh;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+
+ .box {
+ padding: 25px 40px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ width: 100%;
+ max-width: 350px;
+ box... | Unknown | 웹폰트 같은경우는 index.html파일에서 추가할 수도 있고
common.scss에서 관리할 수도 있습니다 |
@@ -0,0 +1,160 @@
+import React from "react";
+import "./Main.scss";
+import { Link, useNavigate } from "react-router-dom";
+
+const Main = () => {
+ const navigate = useNavigate();
+
+ const goToMain = () => {
+ navigate("/jisun-main");
+ };
+
+ return (
+ <div className="main">
+ <nav>
+ <Link t... | Unknown | reset.scss 파일도 마찬가지로 전역에서 적용되어야 하는 파일임으로 index.js에서 import해 오는것이 좋습니다. |
@@ -0,0 +1,160 @@
+import React from "react";
+import "./Main.scss";
+import { Link, useNavigate } from "react-router-dom";
+
+const Main = () => {
+ const navigate = useNavigate();
+
+ const goToMain = () => {
+ navigate("/jisun-main");
+ };
+
+ return (
+ <div className="main">
+ <nav>
+ <Link t... | Unknown | 아이콘들을 눌렀을때 특정페이지로 이동해야하는것이 아니라면 a 태그나 Link 태그가 아닌 여타 다른태그를 활용해서 기능을 구현할 수 있습니다! |
@@ -0,0 +1,160 @@
+import React from "react";
+import "./Main.scss";
+import { Link, useNavigate } from "react-router-dom";
+
+const Main = () => {
+ const navigate = useNavigate();
+
+ const goToMain = () => {
+ navigate("/jisun-main");
+ };
+
+ return (
+ <div className="main">
+ <nav>
+ <Link t... | Unknown | 해당 상대경로가 public폴더를 참고하는거라면
```suggestion
<img alt="계정 프로필 사진" src="/images/jisun/img_profile.png" />
```
이렇게 표현할 수 있습니다 |
@@ -0,0 +1,160 @@
+import React from "react";
+import "./Main.scss";
+import { Link, useNavigate } from "react-router-dom";
+
+const Main = () => {
+ const navigate = useNavigate();
+
+ const goToMain = () => {
+ navigate("/jisun-main");
+ };
+
+ return (
+ <div className="main">
+ <nav>
+ <Link t... | Unknown | className이 너무 모호합니다!! 어떤 아이콘인지 알려주세요 |
@@ -78,6 +78,7 @@ public List<ReviewPhoto> createReviewPhoto(Long reviewId, List<MultipartFile> re
List<ReviewPhoto> reviewPhotoList = new ArrayList<>();
List<String> photoUrls = new ArrayList<>();
+ if(reviewPhotos == null) return reviewPhotoList;
reviewPhotos.forEach(multipartFile ... | Java | 이 부분은 어떤 의미인가요? |
@@ -78,6 +78,7 @@ public List<ReviewPhoto> createReviewPhoto(Long reviewId, List<MultipartFile> re
List<ReviewPhoto> reviewPhotoList = new ArrayList<>();
List<String> photoUrls = new ArrayList<>();
+ if(reviewPhotos == null) return reviewPhotoList;
reviewPhotos.forEach(multipartFile ... | Java | 이 부분은 어떤 의미인가요? |
@@ -0,0 +1,34 @@
+package com.luckytree.shop.utils;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.http.MediaType;
+import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Type;... | Java | 이 클래스를 사용하는 곳이 어딘가요? |
@@ -32,12 +32,11 @@ public class ReviewController {
private final ReviewUseCase reviewUseCase;
@Operation(summary = "리뷰 등록")
- @PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+ @PostMapping(consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE})
public Res... | Java | 리퀘스트바디가 사라졌는데, 이 경우에도 클라이언트에서 JSON 형식의 Body 태그 데이터를 받아오는 데에 문제가 없나요? |
@@ -78,6 +78,7 @@ public List<ReviewPhoto> createReviewPhoto(Long reviewId, List<MultipartFile> re
List<ReviewPhoto> reviewPhotoList = new ArrayList<>();
List<String> photoUrls = new ArrayList<>();
+ if(reviewPhotos == null) return reviewPhotoList;
reviewPhotos.forEach(multipartFile ... | Java | 리뷰 생성 시 포토를 선택하지 않아도 이 서비스가 실행되어서 선택되지 않았을 때 바로 빠져나가게 한겁니다 |
@@ -0,0 +1,34 @@
+package com.luckytree.shop.utils;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.http.MediaType;
+import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Type;... | Java | swagger에서 리뷰 생성 API에 multipartfile을 사용해서 그거 사용하게 만들어주는 클래스입니다 |
@@ -32,12 +32,11 @@ public class ReviewController {
private final ReviewUseCase reviewUseCase;
@Operation(summary = "리뷰 등록")
- @PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+ @PostMapping(consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE})
public Res... | Java | swagger랑 postman에서 확인했고 오히려 리퀘스트바디를 썼을 때 안돼서 바꿨습니다. 이유는 찾아보겠습니다 |
@@ -0,0 +1,43 @@
+//
+// PopcornOrangeButton.swift
+// Popcorn-iOS
+//
+// Created by 제민우 on 1/12/25.
+//
+
+import UIKit
+
+final class PopcornOrangeButton: UIButton {
+ init(text: String, isEnabled: Bool) {
+ super.init(frame: .zero)
+ configureInitialSetting(isEnabled: isEnabled)
+ configu... | Swift | 저도 조만간 이걸로 리팩토링하겠습니다!! |
@@ -0,0 +1,425 @@
+//
+// WriteReviewViewController.swift
+// Popcorn-iOS
+//
+// Created by 제민우 on 1/12/25.
+//
+
+import PhotosUI
+import UIKit
+
+final class WriteReviewViewController: UIViewController {
+ private let viewModel = WriteReviewViewModel()
+
+ private let popupMainImageView: UIImageView = {
+ ... | Swift | 디자인이 추가되어야하지만.. 얼럿으로 표시되는거보다 x버튼이 있는게 어떨까요?
사용자 입장에서 이미지를 초기화 하고싶을 때 사진을 터치하면 이미지 초기화를 한다는걸 떠올리기가 어려울거 같아서요! |
@@ -0,0 +1,43 @@
+//
+// PopcornOrangeButton.swift
+// Popcorn-iOS
+//
+// Created by 제민우 on 1/12/25.
+//
+
+import UIKit
+
+final class PopcornOrangeButton: UIButton {
+ init(text: String, isEnabled: Bool) {
+ super.init(frame: .zero)
+ configureInitialSetting(isEnabled: isEnabled)
+ configu... | Swift | 넵! 나중에 화면 연결 시 내비게이션 바 구현하려고 하였습니다! |
@@ -0,0 +1,425 @@
+//
+// WriteReviewViewController.swift
+// Popcorn-iOS
+//
+// Created by 제민우 on 1/12/25.
+//
+
+import PhotosUI
+import UIKit
+
+final class WriteReviewViewController: UIViewController {
+ private let viewModel = WriteReviewViewModel()
+
+ private let popupMainImageView: UIImageView = {
+ ... | Swift | 실수로 인해 사진이 삭제되는 것을 방지하기 위해 얼럿으로 표시하여 확인을 다시 할 수 있도록 의도하였습니다!
디자이너님과 다시 한 번 상의해봐야겠네요!! |
@@ -0,0 +1,15 @@
+import { useQuery } from '@tanstack/react-query';
+
+import getTempleReviews from './axios';
+import { ReviewsResponse } from './type';
+
+const useGetTempleReviews = (templestayId: string, page: number) => {
+ const { data, isLoading, isError } = useQuery<ReviewsResponse>({
+ queryKey: ['reviews'... | TypeScript | 현재 쿼리키가 reviews와 page로만 정해져 있어서 모든 템플스테이 리뷰가 같은 쿼리키를 공유하고 있어서 queryKey: ['reviews', templestayId, page],로 templestayId를 쿼리키에 추가해주시면 각 템플스테이 리뷰를 구별할 수 있을 것 같습니다. |
@@ -0,0 +1,15 @@
+import { useQuery } from '@tanstack/react-query';
+
+import getTempleReviews from './axios';
+import { ReviewsResponse } from './type';
+
+const useGetTempleReviews = (templestayId: string, page: number) => {
+ const { data, isLoading, isError } = useQuery<ReviewsResponse>({
+ queryKey: ['reviews'... | TypeScript | 넵 반영하겠습니다 |
@@ -0,0 +1,36 @@
+package me.misik.api.infra
+
+import me.misik.api.core.Chatbot
+import org.springframework.beans.factory.annotation.Value
+import org.springframework.context.annotation.Bean
+import org.springframework.context.annotation.Configuration
+import org.springframework.http.HttpHeaders
+import org.springfram... | Kotlin | hoxy 환경변수 등록하는거면 @Value 사용해도 될까요? 혹은 @Qualifier는 사용할 빈 객체 선택 시 쓰는걸로 알고있는데 환경변수 등록할 때도 쓸 수 있는 방법이 있는지용? 😁 |
@@ -0,0 +1,17 @@
+package me.misik.api.api
+
+import me.misik.api.app.ReCreateReviewFacade
+import org.springframework.web.bind.annotation.PathVariable
+import org.springframework.web.bind.annotation.PostMapping
+import org.springframework.web.bind.annotation.RestController
+
+@RestController
+class ReviewController(
+... | Kotlin | 재생성된 리뷰도 캐싱에 활용하면 좋을 것 같은데 제가 #5 할 때 추가해봐도 될까요?
1) 재사용을 위해 DB에 저장
2) 이미 같은 유저에게 제공된 리뷰는 또 제공 X
위를 위해서 device id 헤더를 받아오려고 합니당! |
@@ -0,0 +1,24 @@
+# 리뷰 생성
+
+리뷰를 생성합니다.
+
+## Request
+
+### HTTP METHOD : `GET`
+
+### url : `https://api.misik.me/reviews/{id}`
+### Http Headers
+- device-id: 식별할 수 있는 값
+ `미래에도 변하지 않아야함 앱을 삭제했다 다시 깔아도 안변하는 값으로 줄 수 있는지`
+
+### Response
+
+#### `Response Status 200 OK`
+
+```json
+{
+ "isSuccess": true, // 리뷰가 생... | Unknown | 이 부분 다음 엔지니어 회의 때 클라이언트 분들과 이야기 해보면 어떨까요? 😁
앞으로도 비슷한 조회 로직을 위해 합의해두면 좋을듯요!
지금처럼 조회할 때 값이 없으면 200을 주고 필드로 구분하게 할 것인지, 아니면 400을 내려줄지에 대해서용! |
@@ -0,0 +1,17 @@
+package me.misik.api.api
+
+import me.misik.api.app.ReCreateReviewFacade
+import org.springframework.web.bind.annotation.PathVariable
+import org.springframework.web.bind.annotation.PostMapping
+import org.springframework.web.bind.annotation.RestController
+
+@RestController
+class ReviewController(
+... | Kotlin | hoxy 여기 메서드명이 reCreateReview가 아닌 createReview인데 의도하신걸까요? 🥳 |
@@ -0,0 +1,24 @@
+# 리뷰 생성
+
+리뷰를 생성합니다.
+
+## Request
+
+### HTTP METHOD : `GET`
+
+### url : `https://api.misik.me/reviews/{id}`
+### Http Headers
+- device-id: 식별할 수 있는 값
+ `미래에도 변하지 않아야함 앱을 삭제했다 다시 깔아도 안변하는 값으로 줄 수 있는지`
+
+### Response
+
+#### `Response Status 200 OK`
+
+```json
+{
+ "isSuccess": true, // 리뷰가 생... | Unknown | 👍 넘 좋아요! streaming 방식 지원할거라서 생성시 리뷰 id만 반환하고, id로 여러 번 조회해오게 하기!! 좋습니당!! |
@@ -0,0 +1,65 @@
+package me.misik.api.core
+
+import kotlinx.coroutines.flow.Flow
+import me.misik.api.domain.Review
+import org.springframework.web.bind.annotation.RequestBody
+import org.springframework.web.service.annotation.PostExchange
+
+fun interface Chatbot {
+
+ @PostExchange("/testapp/v1/chat-completions/... | Kotlin | HTTP Interface 👍 가독성 짱이네용 |
@@ -0,0 +1,24 @@
+# 리뷰 생성
+
+리뷰를 생성합니다.
+
+## Request
+
+### HTTP METHOD : `GET`
+
+### url : `https://api.misik.me/reviews/{id}`
+### Http Headers
+- device-id: 식별할 수 있는 값
+ `미래에도 변하지 않아야함 앱을 삭제했다 다시 깔아도 안변하는 값으로 줄 수 있는지`
+
+### Response
+
+#### `Response Status 200 OK`
+
+```json
+{
+ "isSuccess": true, // 리뷰가 생... | Unknown | 아 이게 60초 대기때문에 추가된거군요!
1. 리뷰 생성 중, 아직 덜 생성됨
2. 아예 없는 리뷰id를 조회하려고 함
3. 리뷰 생성됨, 조회 가능
이렇게 3가지 경우가 있어보여요! |
@@ -0,0 +1,36 @@
+package me.misik.api.infra
+
+import me.misik.api.core.Chatbot
+import org.springframework.beans.factory.annotation.Value
+import org.springframework.context.annotation.Bean
+import org.springframework.context.annotation.Configuration
+import org.springframework.http.HttpHeaders
+import org.springfram... | Kotlin | 오 오타입니다! ㅋㅋㅋㅋ
수정했습니다 [b838a91](https://github.com/Nexters/misik-api/pull/7/commits/b838a916d60cf5b000f306c15caf7652e9ee0082) |
@@ -0,0 +1,17 @@
+package me.misik.api.api
+
+import me.misik.api.app.ReCreateReviewFacade
+import org.springframework.web.bind.annotation.PathVariable
+import org.springframework.web.bind.annotation.PostMapping
+import org.springframework.web.bind.annotation.RestController
+
+@RestController
+class ReviewController(
+... | Kotlin | 넵 당연하죵 수정해주셔도 됩니다!
추가로, 구현하면서 출시전에 해야할거 같은 캐싱을 발견했는데요.
현재는 리뷰를 생성할때, streaming방식으로 DB에 하나씩 적재를 하는 방식을 사용하고 있습니다.
즉, 쿼리가 streaming의 응답갯수 만큼 나가고, 위 사진에서는 총 77번 쿼리가 수행되었습니다.
이렇게 로직을 짜는건 DB에 부담이 되고, 성능도 나오기 힘드니
쓰기 캐싱을 해야할거 같아요.
두가지 플로우에 레디스 혹은 인메모리로 캐싱을 추가해야할거 같은데요.
1. 실시간 폴링 리뷰 조회 (1차 MVP에서는 없음) -> redis에... |
@@ -0,0 +1,24 @@
+# 리뷰 생성
+
+리뷰를 생성합니다.
+
+## Request
+
+### HTTP METHOD : `GET`
+
+### url : `https://api.misik.me/reviews/{id}`
+### Http Headers
+- device-id: 식별할 수 있는 값
+ `미래에도 변하지 않아야함 앱을 삭제했다 다시 깔아도 안변하는 값으로 줄 수 있는지`
+
+### Response
+
+#### `Response Status 200 OK`
+
+```json
+{
+ "isSuccess": true, // 리뷰가 생... | Unknown | 넵넵 서버사이드 폴링 (60초 대기) 때문에 추가된 부분입니다!
리뷰가 생성중이면 false, 리뷰가 생성되었으면 true를 응답해주려고 해요.
> 아예 없는 리뷰id를 조회하려고 함
에러 응답이랑은 다른내용같아서, 에러 응답템플릿은 따로 정의해보면 될 것 같습니다!
현재는 없는 리뷰를 조회하려고 하면 400 BadRequest로 응답하고 있씁니다. |
@@ -0,0 +1,17 @@
+package me.misik.api.api
+
+import me.misik.api.app.ReCreateReviewFacade
+import org.springframework.web.bind.annotation.PathVariable
+import org.springframework.web.bind.annotation.PostMapping
+import org.springframework.web.bind.annotation.RestController
+
+@RestController
+class ReviewController(
+... | Kotlin | 오타입니다! 수정했습니다 🥳 |
@@ -0,0 +1,17 @@
+package me.misik.api.api
+
+import me.misik.api.app.ReCreateReviewFacade
+import org.springframework.web.bind.annotation.PathVariable
+import org.springframework.web.bind.annotation.PostMapping
+import org.springframework.web.bind.annotation.RestController
+
+@RestController
+class ReviewController(
+... | Kotlin | 조회, 생성(및 재생성) 두 케이스 다 캐싱 가시죠! 👍 |
@@ -0,0 +1,57 @@
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+public class Lotto {
+ private final static int LOTTO_NUM_SIZE = 6;
+ private final List<LottoNo> lottoNums;
+
+ public Lotto(List<LottoNo> lottoNums) {
+ checkSizeValid(lottoNums);... | Java | final 로 선언하신 이유가 궁금합니다~ |
@@ -0,0 +1,57 @@
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+public class Lotto {
+ private final static int LOTTO_NUM_SIZE = 6;
+ private final List<LottoNo> lottoNums;
+
+ public Lotto(List<LottoNo> lottoNums) {
+ checkSizeValid(lottoNums);... | Java | check 메서드들이 public 인 이유가 있나요~? |
@@ -0,0 +1,57 @@
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+public class Lotto {
+ private final static int LOTTO_NUM_SIZE = 6;
+ private final List<LottoNo> lottoNums;
+
+ public Lotto(List<LottoNo> lottoNums) {
+ checkSizeValid(lottoNums);... | Java | java 8 의 stream map 을 써보면 어떨까요? |
@@ -0,0 +1,57 @@
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+public class Lotto {
+ private final static int LOTTO_NUM_SIZE = 6;
+ private final List<LottoNo> lottoNums;
+
+ public Lotto(List<LottoNo> lottoNums) {
+ checkSizeValid(lottoNums);... | Java | 접근제어자를 package-private 으로 하신 이유가 있을까요? |
@@ -0,0 +1,57 @@
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+public class Lotto {
+ private final static int LOTTO_NUM_SIZE = 6;
+ private final List<LottoNo> lottoNums;
+
+ public Lotto(List<LottoNo> lottoNums) {
+ checkSizeValid(lottoNums);... | Java | Set<LottoNo> 로 선언하는 것은 어떻게 생각하시나요~ |
@@ -0,0 +1,46 @@
+import java.util.Objects;
+
+public class LottoNo implements Comparable<LottoNo> {
+ private final static int INVALID_NUM = 0;
+ public final static LottoNo INVALID_LOTTO_NO = new LottoNo(INVALID_NUM);
+
+ private int lottoNumber;
+
+ public LottoNo(int lottoNumber) {
+ try {
+ ... | Java | LottoNo 는 변경되지 않는 lottoNumber 하나를 가지고 있어야하므로
final 키워드를 넣어도 될 것 같네요 ㅎㅎ |
@@ -0,0 +1,46 @@
+import java.util.Objects;
+
+public class LottoNo implements Comparable<LottoNo> {
+ private final static int INVALID_NUM = 0;
+ public final static LottoNo INVALID_LOTTO_NO = new LottoNo(INVALID_NUM);
+
+ private int lottoNumber;
+
+ public LottoNo(int lottoNumber) {
+ try {
+ ... | Java | 음.. RuntimeException 을 발생시키고 catch 를 굳이 하는 이유가 있을까요?
checkedException 과 uncheckedException 에 대해서 공부해보시면 좋을 것 같습니다~ |
@@ -0,0 +1,46 @@
+import java.util.Objects;
+
+public class LottoNo implements Comparable<LottoNo> {
+ private final static int INVALID_NUM = 0;
+ public final static LottoNo INVALID_LOTTO_NO = new LottoNo(INVALID_NUM);
+
+ private int lottoNumber;
+
+ public LottoNo(int lottoNumber) {
+ try {
+ ... | Java | 굳이 메서드로 빼지 않아도 될 것 같아요 |
@@ -0,0 +1,40 @@
+import java.util.ArrayList;
+import java.util.List;
+
+public class LottoRankResult {
+ private List<Rank> ranks;
+
+ public LottoRankResult(WinningLotto winningLotto, LottoTicket lottoTicket) {
+ this.ranks = new ArrayList<>();
+
+ for (Lotto lotto : lottoTicket.getAllLottoGames()... | Java | 뭔가 이름이 결과를 담는 데이터 그릇 같은 느낌이라
LottoCalculator
LottoResultCalculator
LottoRankCalculator
같은 네이밍으로 변경해보면 어떨까요?
그에 맞춰서 메서드 네이밍도 변경하면 단순히 set 된 데이터를 get 하는 것보다
상태와 행위를 갖는 객체지향적인 네이밍이 될 것 같다는 생각이 듭니다 |
@@ -0,0 +1,22 @@
+import java.util.ArrayList;
+import java.util.List;
+
+public class Lottos {
+ private List<Lotto> lottos;
+
+ public Lottos() {
+ this.lottos = new ArrayList<>();
+ }
+
+ public List<Lotto> getLottos() {
+ return lottos;
+ }
+
+ public void addLotto(Lotto lotto) {
+ ... | Java | Lottos 가 가지는 행위가 하나도 없는데요,
다른 객체에서 위임할만한게 없을까요?
get이 사용되고 있다는 것은 Lottos 의 tell dont ask 원칙이 안지켜지고 있다는 뜻이고,
여기로 위임할만한 책임이 산재해 있다는 뜻이기도 합니다. |
@@ -0,0 +1,29 @@
+import java.util.List;
+
+public class WinningLotto {
+ private Lotto winningLotto;
+ private LottoNo bonusNo;
+
+ public WinningLotto(List<LottoNo> winningLottoNumbers, LottoNo lottoNo) {
+ if (winningLottoNumbers == null) {
+ throw new IllegalArgumentException("'lotto' mus... | Java | Lotto를 상속 받을 수도 있었는데 이렇게 합성을 사용하셨네요. 👍
혹시라도 우연히 이렇게 구현하신거라면,
상속과 합성을 구글링 해보시면 관련 자료를 찾으실 수 있을겁니다 ~ |
@@ -0,0 +1,43 @@
+import java.util.Scanner;
+
+public class LottoApplication {
+ private static boolean APP_SUCCESS = false;
+
+ public static void main(String[] args) {
+ runUntilAppSuccess();
+ }
+
+ public static void runUntilAppSuccess() {
+ while (!APP_SUCCESS) {
+ run();
+ ... | Java | LottoGame 이라는 네이밍은 어떨까요 |
@@ -0,0 +1,43 @@
+import java.util.Scanner;
+
+public class LottoApplication {
+ private static boolean APP_SUCCESS = false;
+
+ public static void main(String[] args) {
+ runUntilAppSuccess();
+ }
+
+ public static void runUntilAppSuccess() {
+ while (!APP_SUCCESS) {
+ run();
+ ... | Java | lottoService 에 set 하고 get 하고 절차지향적인 방식으로 코드가 짜여져 있습니다.
모든 로직이 lottoService 를 통하면서 결국 이 클래스는 점점 비대해질텐데요
좋은 개선 방법이 없을까요~? |
@@ -0,0 +1,48 @@
+import java.util.Arrays;
+
+public enum Rank {
+ FIRST(6, 2000000000),
+ SECOND(5, 30000000),
+ THIRD(5, 1500000),
+ FOURTH(4, 50000),
+ FIFTH(3, 5000),
+ MISS(0, 0);
+
+ private int countOfMatch;
+ private Money winningMoney;
+
+ Rank(int countOfMatch, int winningMoney) {
+... | Java | 중괄호가 빠졌습니다 |
@@ -0,0 +1,21 @@
+public class RankResult {
+ private Rank rank;
+ private int countOfRank;
+
+ RankResult(Rank rank) {
+ this.rank = rank;
+ this.countOfRank = 0;
+ }
+
+ public Rank getRank() {
+ return rank;
+ }
+
+ public int getCountOfRank() {
+ return countOfRank;
... | Java | 데이터들을 클래스로 묶는 것이 객체지향은 아닙니다~
RankResult 도 결국 데이터와 get 만 가지고 있고,
유의미한 행위가 없습니다 ㅠㅠ
불필요한 객체가 아닌지, 유의미한 행위를 가진 객체로 만들려면 어떤 행위를 부여해야하는지
고민해보시면 좋을 것 같아요~ |
@@ -0,0 +1,50 @@
+import java.util.List;
+
+public class LottoSeller {
+ private LottoPurchaseService lottoPurchaseService;
+ private Money change;
+
+ public LottoSeller() {
+ change = Money.ZERO;
+ lottoPurchaseService = new LottoPurchaseService();
+ }
+
+ public LottoTicket sellTicketTo(... | Java | Service 라는 네이밍을 쓰시는걸로 봐서
웹 쪽 자료를 보신 것 같은데,
controller, service, repository
이런 layered architecture 는 지금 저희가 하고 있는 객체지향과 거리가 좀 있습니다 ~
service 라는 네이밍을 사용하기보다는 좀 더 구체적이고 누구나 글 읽듯이 볼 수 있는 네이밍을 하시면
해당 객체에 부여하는 책임과 행위들도 달라지게 됩니다 ~
네이밍은 단순히 시각적인 효과 그 이상의 가치를 가지고 있습니다 |
@@ -0,0 +1,50 @@
+import java.util.List;
+
+public class LottoSeller {
+ private LottoPurchaseService lottoPurchaseService;
+ private Money change;
+
+ public LottoSeller() {
+ change = Money.ZERO;
+ lottoPurchaseService = new LottoPurchaseService();
+ }
+
+ public LottoTicket sellTicketTo(... | Java | 점 하나 찍을 때는 줄바꿈을 안하시는게 일반적입니다.
메소드 파라미터도 3개 이상부터 엔터를 치시는게 어떨까요? |
@@ -0,0 +1,42 @@
+import java.util.List;
+
+public class LottoService {
+ LottoUser lottoUser;
+ LottoSeller lottoSeller;
+ LottoTicket purchasedLottoTicket = null;
+ WinningLotto winningLotto = null;
+ PurchaseResultView purchaseResultView = null;
+ WinningResultView winningResultView = null;
+
+ ... | Java | set을 사용하지 않는다는 객체지향 생활체조 규칙을 적용해보시면
코드의 설계가 달라질 것 같습니다 |
@@ -0,0 +1,43 @@
+import java.util.ArrayList;
+import java.util.List;
+
+public class LottoTicket {
+ private Money ticketPrice;
+ private Lottos autoLottos;
+ private Lottos manualLottos;
+
+ public LottoTicket(Money ticketPrice, Lottos autoLottos, Lottos manualLottos) {
+ this.ticketPrice = ticketP... | Java | 여기도 행위가 없고 데이터 + getter 뿐이네요.
그런데 이렇게 클래스를 나눠보려고 최대한 시도하신 점 👍 |
@@ -0,0 +1,35 @@
+import java.util.List;
+
+public class LottoUser {
+ private Money investMoney;
+ private int countOfManualLotto;
+ private List<List<LottoNo>> numbersOfManualLottos;
+
+ private LottoTicket lottoTicket;
+
+ public LottoUser(Money investMoney, int countOfManualLotto, List<List<LottoNo>>... | Java | 여기도 setter getter 뿐 이네요 ㅠ |
@@ -0,0 +1,65 @@
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public final class LottoPurchaseService {
+ public final static Money LOTTO_PRICE = Money.valueOf(1000);
+
+ public static Money validatePurchase(Money inputMoney, int countOfManualLotto) throws OutOfConditionE... | Java | 데이터와 프로세스가 따로 있는 것 == 절차지향 프로그래밍
현 상황 :
데이터 = LottoSeller, Ticket, User 등 (데이터 + getter)
프로세스 = Service (데이터 get 해서 로직 처리)
답 : MVC와 layered architecture를 잊고 view 와 비즈니스 로직을 분리하는 것만 기억하고 짜보기 |
@@ -0,0 +1,65 @@
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Scanner;
+import java.util.stream.Collectors;
+
+public final class InputView {
+
+ public static Money scanMoney(Scanner scanner) {
+ System.out.println("\n구입금액을 입력해 주세요.");
+
+ return Mon... | Java | view 에서는 데이터를 scan 해오는 책임만 있습니다.
지금은 변환 로직까지 여기서 처리하고 있네요~! |
@@ -0,0 +1,29 @@
+public final class PurchaseResultView {
+ public void notifyIfChangeLeft(LottoSeller seller) {
+ if (!seller.getChange().equals(Money.ZERO)) {
+ System.out.println("잔돈 " + seller.getChange() + "원이 남았습니다.");
+ System.out.println();
+ }
+ }
+
+ public void pr... | Java | finall class 로 하신 이유가 궁금합니다~ |
@@ -1,23 +1,20 @@
<template>
- <button
- @click="
- () => {
- if (!props.disabled) props.onClick();
- }
- "
- :class="getNextButtonStyle()"
- >
- <slot></slot>
+ <button @click="handleNextButtonClick" :class="getNextButtonStyle()">
+ <slot />
</button>
</template>
<script setu... | Unknown | 단순 궁금증으로 질문드립니다.
undefined를 타입으로 지정하신 이유가 있을까요?
NextButton.vue의 부모 컴포넌트에서 isPrimary 값을 부여하지 않을 때가 있어 undefined를 포함한 것으로 보이는데,
이 경우는 ? 만으로도 충분히 표현이 된 것 같습니다.
특히 boolean이기때문에 undefined일 때 falsy하게 인식이 될 것 같은데
추가하신 이유가 궁금합니다~ |
@@ -3,8 +3,8 @@
<p class="text-medium font-semi_bold">{{ title }}</p>
<div class="flex gap-x-3">
<button
- v-for="size in sizes"
- :key="size.id"
+ v-for="(size, index) in sizes"
+ :key="getButtonKey(size, index)"
class="flex flex-col items-center justify-between ga... | Unknown | storeToRefs 를 사용해서 반응성을 살리셨네요 👍 |
@@ -3,16 +3,12 @@
<section
class="mx-auto flex h-full flex-col items-center justify-between bg-gray_00-light text-gray_05-light dark:bg-gray_00-dark dark:text-gray_05-dark sm:w-screen md:w-96"
>
- <ProgressNavBar prevPage="/size" pageName="ingredient" />
- <div v-if="isLoading">로딩중입니다.</div>
... | Unknown | 서버 상태관리와 클라이언트 상태관리를 분리하여 관리하셨군요 👍 |
@@ -1,23 +1,20 @@
<template>
- <button
- @click="
- () => {
- if (!props.disabled) props.onClick();
- }
- "
- :class="getNextButtonStyle()"
- >
- <slot></slot>
+ <button @click="handleNextButtonClick" :class="getNextButtonStyle()">
+ <slot />
</button>
</template>
<script setu... | Unknown | 사실 저도 추가하지 않았다가, 좀더 가시적으로 표현하려고 작성을 했어요! 음, 메이브님 말씀듣고 다시 생각해보니 가시성만으로 추가하는 건 좀 의미가 없는 것 같긴하네요!! |
@@ -3,20 +3,18 @@
class="text-gray_05-light dark:text-gray_05-dark w-6 h-6"
@click="goBack"
>
- <slot></slot>
+ <slot />
</button>
</template>
<script setup lang="ts">
-import { useRouter } from 'vue-router';
+import { pushPage } from '@router/route.helper';
const props = defineProps<{
p... | Unknown | 화살표 함수로 해주세요~ |
@@ -0,0 +1,91 @@
+package christmas.Controller;
+
+import christmas.Domain.EventBenefitSettler;
+import christmas.Domain.EventPlanner;
+import christmas.Event.EventBadge;
+import christmas.View.InputView;
+import christmas.View.OutputView;
+import java.util.Map;
+
+public class EventController {
+ public EventPlanne... | Java | ```suggestion
public void takeVisitDate() {
try {
String visitDate = InputView.readVisitDate();
eventBenefitSettler = new EventBenefitSettler(visitDate);
} catch (IllegalArgumentException e) {
OutputView.printException(e);
takeVisitDate();
... |
@@ -0,0 +1,92 @@
+package christmas.Util;
+
+import static christmas.Event.EventOption.EVENT_END_DATE;
+import static christmas.Event.EventOption.EVENT_START_DATE;
+import static christmas.Event.EventOption.MAX_ORDER_QUANTITY;
+import static christmas.Message.OutputMessage.NOT_A_VALID_DATE;
+
+import christmas.Domain.M... | Java | 정규표현식을 정말 잘 활용하시는군요!👍👍
그런데 `(?:,|$)` 는 어떤 역할을 하는지 궁금합니다! |
@@ -0,0 +1,92 @@
+package christmas.Util;
+
+import static christmas.Event.EventOption.EVENT_END_DATE;
+import static christmas.Event.EventOption.EVENT_START_DATE;
+import static christmas.Event.EventOption.MAX_ORDER_QUANTITY;
+import static christmas.Message.OutputMessage.NOT_A_VALID_DATE;
+
+import christmas.Domain.M... | Java | `isDrinkMenu` 는 `MenuBoard` 에게 넘겨주면 어떨까요??
음료를 확인하는 책임은 `MenuBoard` 가 가지고 있는게 더 어울릴 것 같아요! 😁 |
@@ -0,0 +1,92 @@
+package christmas.Util;
+
+import static christmas.Event.EventOption.EVENT_END_DATE;
+import static christmas.Event.EventOption.EVENT_START_DATE;
+import static christmas.Event.EventOption.MAX_ORDER_QUANTITY;
+import static christmas.Message.OutputMessage.NOT_A_VALID_DATE;
+
+import christmas.Domain.M... | Java | 해당 정규표현식이 반복되는 것 같아요! 그렇다면 Pattern 객체를 캐싱해주면 어떨까요??
디스코드 함께 나누기에 현지님이[ 공유하신 글](https://velog.io/@dlguswl936/%EA%B3%B5%EB%B6%80%ED%95%9C-%EA%B2%83-String.matches%EB%8A%94-%EC%99%9C-%EC%84%B1%EB%8A%A5%EC%97%90-%EC%95%88-%EC%A2%8B%EC%9D%84%EA%B9%8C#%EA%B2%B0%EB%A1%A0-pattern-%EA%B0%9D%EC%B2%B4%EB%A5%BC-%EC%BA%90%EC%8B%B1... |
@@ -0,0 +1,30 @@
+package christmas.Util;
+
+public class CommaFormatter {
+ public static String formatWithComma(int number) {
+ String numberStr = Integer.toString(number);
+ int length = numberStr.length();
+
+ if (length <= 3) {
+ return numberStr;
+ }
+ String resul... | Java | 콤마를 위해 전용 객체를 만들어주셨군요! 직접 만들어주는 것도 좋네요!
그런데 돈 단위를 위한 콤마를 넣어주는 기능을 자바에서 제공하고 있답니다! ㅎㅎ
DecimalFormat 에 대해서 알아보시면 좋을 것 같아요! 제가 [참고했던 글](https://jamesdreaming.tistory.com/203)을 공유합니다! |
@@ -0,0 +1,67 @@
+package christmas.Domain;
+
+import christmas.Util.OrderMenuValidator;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class EventPlanner {
+ private final List<Menu> o... | Java | ```suggestion
public Map<String, Integer> calculateCategoryCount() {
Map<String, Integer> categoryCount = new HashMap<>();
int count = 0;
for (Menu menu : orderMenu) {
String menuCategory = menu.getMenuCategory();
categoryCount.put(menuCategory, categoryCount.ge... |
@@ -0,0 +1,102 @@
+package christmas.Domain;
+
+import christmas.Event.EventBenefit;
+import christmas.Event.EventOption;
+import christmas.Event.SpecialDiscountDay;
+import christmas.Util.OrderMenuValidator;
+import java.time.DayOfWeek;
+import java.time.LocalDate;
+import java.util.HashMap;
+import java.util.Map;
+
+... | Java | `LocalDate` 를 활용하면 요일을 파악할 수 있군요! 배워갑니다! 😁 |
@@ -47,4 +47,13 @@ final class SettingViewModel {
seconds: 0,
identifier: "SelectedTimeNotification")
}
+
+ // URL 열기 메서드
+ func openURL(_ urlString: String) {
+ guard let url = URL(string: urlString), UIApplication.shared.canOpenURL(url) else {
+ print("유효하지 않... | Swift | url 이동이 이렇게 구현하는 거군요 |
@@ -0,0 +1,209 @@
+import styled from '@emotion/styled';
+import { colors } from '@sopt-makers/colors';
+import { fonts } from '@sopt-makers/fonts';
+import { IconCheck, IconChevronDown } from '@sopt-makers/icons';
+import { Button } from '@sopt-makers/ui';
+import { ReactNode, useEffect, useState } from 'react';
+
+im... | Unknown | 그 `BottomSheetSelect`컴포넌트를 이전에 도영이가 구현해줬었는데 요게 동일한 목적을 가진 컴포넌트인걸로 보여서요..!!! 혹시 따로 구현하신 이유가 있을까요??
혹시 존재하는지 몰랐던걸까 주륵.. 만약에 그런것이라면 어차피 mds로 대체되어야할 부분이니, 잘 작동한다면 수정할 필요는 없을거같습니다!!!! |
@@ -0,0 +1,328 @@
+import styled from '@emotion/styled';
+import { colors } from '@sopt-makers/colors';
+import { fonts } from '@sopt-makers/fonts';
+import { Button, Callout, SelectV2, Tag, TextArea, useDialog, useToast } from '@sopt-makers/ui';
+import { useMutation } from '@tanstack/react-query';
+import { useRouter... | Unknown | mutation 실패시 에러처리도 넣어주면 좋을거같아요!! onError 옵션을 추가해서 '문제가 발생했어요.' 와 같은 toast를 추가해주어도 좋을거같아요! |
@@ -0,0 +1,209 @@
+import styled from '@emotion/styled';
+import { colors } from '@sopt-makers/colors';
+import { fonts } from '@sopt-makers/fonts';
+import { IconCheck, IconChevronDown } from '@sopt-makers/icons';
+import { Button } from '@sopt-makers/ui';
+import { ReactNode, useEffect, useState } from 'react';
+
+im... | Unknown | 앗 이거 코드 자체가 도영이가 만든거 기반이 맞습니다 ㅎㅎ! 단, 이번에 mds 디자인이 업데이트 되면서 기존 바텀시트 디자인이 아니라.. description 부분이 추가되어가지고, 도영이가 만들어준 친구랑 조금 다르게 작동해야 했습니다..! 기존에 쓰이던 바텀시트를 수정하면 사이드이펙트가 좀 많이 생길 것 같아서 일단은 현재 커스텀으로 구현해둔거라, Mds로 대체하면 될 것같아요! |
@@ -0,0 +1,328 @@
+import styled from '@emotion/styled';
+import { colors } from '@sopt-makers/colors';
+import { fonts } from '@sopt-makers/fonts';
+import { Button, Callout, SelectV2, Tag, TextArea, useDialog, useToast } from '@sopt-makers/ui';
+import { useMutation } from '@tanstack/react-query';
+import { useRouter... | Unknown | 아아 너무 좋습니다! |
@@ -0,0 +1,209 @@
+import styled from '@emotion/styled';
+import { colors } from '@sopt-makers/colors';
+import { fonts } from '@sopt-makers/fonts';
+import { IconCheck, IconChevronDown } from '@sopt-makers/icons';
+import { Button } from '@sopt-makers/ui';
+import { ReactNode, useEffect, useState } from 'react';
+
+im... | Unknown | 아 UI가 좀 달랐군요~!!! 확인했습니다 ㅎㅎㅎ |
@@ -0,0 +1,31 @@
+package com.spoteditor.backend.domain.user.controller;
+
+import com.spoteditor.backend.common.exceptions.user.UserException;
+import com.spoteditor.backend.common.exceptions.user.UserErrorCode;
+import com.spoteditor.backend.domain.user.service.UserTokenService;
+import jakarta.servlet.http.HttpServl... | Java | BaseException이 RuntimeException을 상속받는 저희 프로젝트의 최상위 예외가 맞다면 직접 노출을 할 필요가 없어보입니다.
최상위 언체크 예외를 개발 후 그 언체크 예외를 상속받고 각각의 커스텀 오류 코드를 등록한다면 될 것 같습니다.
예외 처리는 세밀하게 하는 것이 좋습니다. |
@@ -0,0 +1,41 @@
+package com.spoteditor.backend.domain.user.service;
+
+import com.spoteditor.backend.common.exceptions.user.UserErrorCode;
+import com.spoteditor.backend.common.exceptions.user.UserException;
+import com.spoteditor.backend.common.util.CookieUtils;
+import com.spoteditor.backend.domain.user.common.dto.... | Java | 이 부분도 동일한 맥락입니다. |
@@ -0,0 +1,43 @@
+package com.spoteditor.backend.security.oauth.handler;
+
+import com.spoteditor.backend.common.util.CookieUtils;
+import com.spoteditor.backend.security.jwt.JwtConstants;
+import com.spoteditor.backend.security.jwt.JwtUtils;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpSe... | Java | `/success` 경로가 콜백 처리인가요? |
@@ -0,0 +1,43 @@
+package com.spoteditor.backend.security.oauth.handler;
+
+import com.spoteditor.backend.common.util.CookieUtils;
+import com.spoteditor.backend.security.jwt.JwtConstants;
+import com.spoteditor.backend.security.jwt.JwtUtils;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.http.HttpSe... | Java | 네 맞습니다 |
@@ -0,0 +1,31 @@
+package com.spoteditor.backend.domain.user.controller;
+
+import com.spoteditor.backend.common.exceptions.user.UserException;
+import com.spoteditor.backend.common.exceptions.user.UserErrorCode;
+import com.spoteditor.backend.domain.user.service.UserTokenService;
+import jakarta.servlet.http.HttpServl... | Java | 답변주신 내용이 BaseException을 상속받는 각각의 커스텀 오류 클래스를 생성해서 더 의미를 명확하게 하라는 말씀이신가요? |
@@ -0,0 +1,31 @@
+package com.spoteditor.backend.domain.user.controller;
+
+import com.spoteditor.backend.common.exceptions.user.UserException;
+import com.spoteditor.backend.common.exceptions.user.UserErrorCode;
+import com.spoteditor.backend.domain.user.service.UserTokenService;
+import jakarta.servlet.http.HttpServl... | Java | 네, 지금 코드를 보시면 BaseException을 그대로 반환하도록 되어 있는데 추가 요구사항 접수시 유지보수가 어려울 수 있습니다. |
@@ -0,0 +1,31 @@
+package com.spoteditor.backend.domain.user.controller;
+
+import com.spoteditor.backend.common.exceptions.user.UserException;
+import com.spoteditor.backend.common.exceptions.user.UserErrorCode;
+import com.spoteditor.backend.domain.user.service.UserTokenService;
+import jakarta.servlet.http.HttpServl... | Java | 그리고 추가적으로 말씀을 드리는건 저희 간트 차트에 있는 규약을 다시 한 번 이해를 하셔야 할 것 같습니다
POST 요청인 경우에는 분명 바디가 없이 HTTP Status Code를 명확하게 보내줘야하는데 오히려 List 컬렉션을 반환하고 있습니다 |
@@ -0,0 +1,41 @@
+package com.spoteditor.backend.domain.user.service;
+
+import com.spoteditor.backend.common.exceptions.user.UserErrorCode;
+import com.spoteditor.backend.common.exceptions.user.UserException;
+import com.spoteditor.backend.common.util.CookieUtils;
+import com.spoteditor.backend.domain.user.common.dto.... | Java | 이 UserIdDto를 컨트롤러에서 어떻게 활용할 수 있는지를 문서화해주시면 읽어보고 공간 측에 적용하겠습니다. |
@@ -1,8 +1,79 @@
import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+
+import './Login.scss';
class Login extends Component {
+ constructor() {
+ super();
+ this.state = {
+ id: '',
+ pw: '',
+ };
+ }
+
+ handleInput = event => {
+ const { name, value } = ev... | JavaScript | 오 구조분해 할당~ |
@@ -1,8 +1,79 @@
import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+
+import './Login.scss';
class Login extends Component {
+ constructor() {
+ super();
+ this.state = {
+ id: '',
+ pw: '',
+ };
+ }
+
+ handleInput = event => {
+ const { name, value } = ev... | JavaScript | this.state.id.includes('@') &&
this.state.id.length >= 5 &&
this.state.pw.length >= 8 이걸 true/false Boolean?? 이값을 사용해서 삼항연산자로 해도 되지 않을까요 수정님은 잘하시니 아마가능하실듯! |
@@ -0,0 +1,61 @@
+.Login {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+
+ main {
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ width: 350px;
+ height: 380px;
+ padding: 40px;
+ border: 1px solid #ccc;
+
+ header {
+ ... | Unknown | 이건 왜 주석으로 되있나요??? |
@@ -0,0 +1,134 @@
+[
+ {
+ "id": 1,
+ "userName": "eessoo__",
+ "src": "../images/soojeongLee/user2.jpg",
+ "feedText": "💟",
+ "commentData": [
+ {
+ "id": 1,
+ "userName": "wecode",
+ "content": "Welcome to world best coding bootcamp!",
+ "commnetLike": false
+ },... | Unknown | 제이슨 파일도 있었군요! |
@@ -0,0 +1,175 @@
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+
+import Comment from './Comment/Comment';
+
+import '../Feed/Feed.scss';
+
+export class Feed extends Component {
+ constructor() {
+ super();
+ this.state = {
+ comment: '',
+ // commentList: [],
+... | JavaScript | 오 이렇게 다시 볼 수 있는 방법도 나쁘지 않은 듯 ?
나중에 가서는 지워야 될 수도 있지만...? |
@@ -0,0 +1,175 @@
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+
+import Comment from './Comment/Comment';
+
+import '../Feed/Feed.scss';
+
+export class Feed extends Component {
+ constructor() {
+ super();
+ this.state = {
+ comment: '',
+ // commentList: [],
+... | JavaScript | 버튼으로 한 이유가 있나요? 궁금 |
@@ -0,0 +1,175 @@
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+
+import Comment from './Comment/Comment';
+
+import '../Feed/Feed.scss';
+
+export class Feed extends Component {
+ constructor() {
+ super();
+ this.state = {
+ comment: '',
+ // commentList: [],
+... | JavaScript | autoComplete 이거는 뭔가요? 궁금~ |
@@ -0,0 +1,128 @@
+@import '../../../../styles/variables.scss';
+
+article {
+ margin-bottom: 20px;
+ background-color: #fff;
+ border-radius: 3px;
+ border: 1px solid $border-color;
+
+ header {
+ @include flex-center;
+ justify-content: space-between;
+ align-content: center;
+ padding: 10px;
+
+ ... | Unknown | 이런 scss 기능 저는 헷갈려서 잘 못하겠던데 잘하시네요.. |
@@ -0,0 +1,23 @@
+//라이브러리
+import React, { Component } from 'react';
+import { Link } from 'react-router-dom';
+
+//컴포넌트
+import { FOOTLIST } from '../FootLists/footData';
+
+// css
+import './FootLists.scss';
+
+export class FootLists extends Component {
+ render() {
+ return FOOTLIST.map(footlists => {
+ ret... | JavaScript | 댓글 프랍스! |
@@ -0,0 +1,46 @@
+export const FOOTLIST = [
+ {
+ id: 1,
+ footlist: '소개',
+ },
+ {
+ id: 2,
+ footlist: '도움말',
+ },
+ {
+ id: 3,
+ footlist: '홍보 센터',
+ },
+ {
+ id: 4,
+ footlist: 'API',
+ },
+ {
+ id: 5,
+ footlist: '채용 정보',
+ },
+ {
+ id: 6,
+ footlist: '개인정보처리방침',
+ }... | JavaScript | 화이팅 푸터 만들어서 강의 부탁드려요 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.