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.