본문 바로가기

프로젝트27

20. 난이도 분류 ※난이도를 상/중/하로 분류※힌트 추가(글자 수, 연관 단어) -백엔드- model -  const mongoose = require("mongoose");const Schema = mongoose.Schema;const gameSchema = new Schema({ _id: { type: String, required: true }, title: { type: String, require: true, unique: true }, image: { type: String, require: true }, level: { type: String, require: true }, //난이도 length: { type: String, require: true }, //힌트 hint: { type: St.. 2024. 6. 14.
19. 종성 ' ' 제외, 쉼표(,) 추가 ※낱말 조합 게임에서 받침이 없는 단어일 시 종성 ' ' 제외하고 랜덤 나열※각 낱말마다 쉼표(,)를 붙혀 구분, 마지막 낱말은 쉼표(,) 제외 Game - import axios from "axios";import React, { useCallback, useEffect, useState } from "react";import "../../css/game.css";import Canvas from "../../component/Canvas";import Typing from "../../component/Typing";import { CHO, JUNG, JONG } from "../../component/Word";import { useNavigate } from "react-router-dom";fu.. 2024. 6. 7.
7. 인증코드 제한 시간 ※인증코드 제한 시간을 3분으로 지정해서 제한 시간이 지날 시 재발급 요청※인증 코드 페이지를 authInput.js 컴포넌트로 분리※localStorage에 사용자 정보를 저장해 서버로 보내는 코드 삭제   -하위 컴포넌트로 state를 전송하는 식으로 변경※회원가입 기능에도 이메일 인증코드 기능 추가    -이메일 오타 입력 시 가입되는 것을 방지※커뮤니티 페이지 삭제, 학습하기 페이지 추가※서버 메일 전송 코드를 util 파일로 분리 -백엔드- util - : 메일 전송 코드 util 파일로 분류const nodemailer = require("nodemailer");require("dotenv").config();module.exports = async (email, title, code) =>.. 2024. 6. 6.
6. 비밀번호 변경 새로운 비밀번호로 변경 -백엔드- controller - (...)//Post Change Password, /change_pwd : 비밀번호 변경const changePwd = asynchHandler(async (req, res) => { const { username, password, checkPassword } = req.body; const user = await User.findOne({ username }); if (password !== checkPassword) { return res.status(401).json({ message: "비밀번호가 일치하지 않습니다." }); } user.password = await bcrypt.hash(password, 10); //새 .. 2024. 5. 27.