Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing
/
D_Team_Khuloud
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Hong
2020-06-08 02:04:20 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
080ee67340caeb36a588cf7e6af6b9e9b75cbb86
080ee673
1 parent
75ed7930
즐겨찾기수정
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
backend/routes/favorites.js
backend/routes/favorites.js
View file @
080ee67
...
...
@@ -102,9 +102,10 @@ router.post('/addfile', function(req, res, next) {
router
.
post
(
'/delfolder'
,
function
(
req
,
res
,
next
)
{
let
user_id
=
req
.
body
.
id
;
let
folder_name
=
req
.
body
.
name
;
let
cur
=
req
.
body
.
cur
;
let
checkfolder
=
'SELECT * FROM folders WHERE location = ? AND user_id = ? AND folder_name = ? AND favorite = 1;'
;
connection
.
query
(
checkfolder
,
[
user_id
,
folder_name
],
function
(
err
,
rows
,
fields
)
{
connection
.
query
(
checkfolder
,
[
cur
,
user_id
,
folder_name
],
function
(
err
,
rows
,
fields
)
{
if
(
err
)
{
console
.
log
(
'select error'
);
res
.
status
(
400
).
send
({
error
:
err
});
...
...
@@ -135,6 +136,7 @@ router.post('/delfolder', function(req, res, next) {
router
.
post
(
'/delfile'
,
function
(
req
,
res
,
next
)
{
let
user_id
=
req
.
body
.
id
;
let
file_name
=
req
.
body
.
name
;
let
cur
=
req
.
body
.
cur
;
let
checkfile
=
'SELECT * FROM files WHERE location = ? AND user_id = ? AND file_name = ? AND favorite = 1;'
;
connection
.
query
(
checkfile
,
[
user_id
,
file_name
],
function
(
err
,
rows
,
fields
)
{
...
...
Please
register
or
login
to post a comment