장준영

refactor : BE API response 값 수정

......@@ -3,6 +3,7 @@ const express = require('express');
const path = require('path');
const cookieParser = require('cookie-parser');
const logger = require('morgan');
const cors = require('cors');
const indexRouter = require('./routes/index');
......@@ -17,6 +18,7 @@ app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));
app.use(cors());
app.use('/', indexRouter);
......
......@@ -25,8 +25,8 @@ exports.calcDistance = async (req, res, next) => {
const minResult = Math.min(rareResult, specialRemovedResult, specialNotRemovedResult);
if (minResult <= 1){
res.status(200).json({success : true, isProfanity : "YES"});
res.status(200).json({success : true, isProfanity : "욕설"});
}else{
res.status(200).json({success : true, isProfanity : "NO"});
res.status(200).json({success : true, isProfanity : "정상"});
}
};
\ No newline at end of file
......
......@@ -8,6 +8,7 @@
},
"dependencies": {
"cookie-parser": "~1.4.4",
"cors": "^2.8.5",
"debug": "~2.6.9",
"dotenv": "^8.2.0",
"express": "~4.16.1",
......