Skip to content
GitLab
Menu
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
Jul 26, 2022
by
Yoon, Daeki
😅
Browse files
fileinfo model 옵션 변경
parent
6c265dde
Changes
2
Hide whitespace changes
Inline
Side-by-side
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
);
...
...
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
;
}
}
...
...
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