Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
travel
Commits
add2d2b3
Commit
add2d2b3
authored
2 years ago
by
Yoon, Daeki
Browse files
Options
Download
Email Patches
Plain Diff
fileinfo model 옵션 변경
parent
6c265dde
main
MK28
MK29
sb0815
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/controllers/mainimg.controller.ts
+4
-5
src/controllers/mainimg.controller.ts
src/models/fileinfo.model.ts
+3
-3
src/models/fileinfo.model.ts
with
7 additions
and
8 deletions
+7
-8
src/controllers/mainimg.controller.ts
View file @
add2d2b3
...
@@ -38,20 +38,19 @@ export const createMainimg = asyncWrap(async (reqExp, res) => {
...
@@ -38,20 +38,19 @@ export const createMainimg = asyncWrap(async (reqExp, res) => {
{
{
originalfilename
,
originalfilename
,
newfilename
,
newfilename
,
picturepath
:
files
.
mainimg
.
filepath
,
}
}
);
);
console
.
log
(
imgRes
)
console
.
log
(
imgRes
)
;
return
res
.
json
(
imgRes
);
return
res
.
json
(
imgRes
);
}
else
{
}
else
{
return
res
.
send
(
"
에러
"
);
return
res
.
send
(
"
에러
"
)
}
}
}
}
}
}
});
});
});
});
export
const
getMainimg
=
asyncWrap
(
async
(
req
,
res
)
=>
{
export
const
getMainimg
=
asyncWrap
(
async
(
req
,
res
)
=>
{
const
mainimgs
=
await
mainimgDb
.
getMainimg
();
const
mainimgs
=
await
mainimgDb
.
getMainimg
();
return
res
.
json
(
mainimgs
);
return
res
.
json
(
mainimgs
);
...
...
This diff is collapsed.
Click to expand it.
src/models/fileinfo.model.ts
View file @
add2d2b3
import
{
model
,
ObjectId
,
Schema
}
from
"
mongoose
"
;
import
{
model
,
ObjectId
,
Schema
}
from
"
mongoose
"
;
export
interface
IFileInfo
{
export
interface
IFileInfo
{
originalfilename
?
:
string
;
originalfilename
:
string
;
newfilename
?
:
string
;
newfilename
:
string
;
picturepath
?
:
string
;
picturepath
:
string
;
nickname
?:
string
;
nickname
?:
string
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help