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
769ea9f4
Commit
769ea9f4
authored
Jul 25, 2022
by
Lee Soobeom
Browse files
추가 변경 사항
parent
14bcff90
Changes
2
Hide whitespace changes
Inline
Side-by-side
frontend/src/auth/admin.tsx
View file @
769ea9f4
...
...
@@ -4,7 +4,6 @@ import { mainimgApi } from "../apis";
// import { profileUpload } from "../apis/profile.api";
import
{
catchErrors
}
from
"
../helpers
"
;
import
{
MainimgType
}
from
"
../types
"
;
import
{
picture
}
from
"
../apis/profile.api
"
;
import
{
MySlide
}
from
"
./adminslide
"
;
// export interface ImgState {
...
...
src/db/mainimg.db.ts
View file @
769ea9f4
...
...
@@ -38,7 +38,7 @@ export const updateOneMainimg = async (
)
=>
{
const
newMainimg
=
await
Mainimg
.
findById
(
_Id
);
console
.
log
(
"
error2
"
,
_Id
);
if
(
!
(
newMainimg
?.
pic
===
undefined
))
{
if
(
!
(
newMainimg
?.
fileInfo
===
undefined
))
{
if
(
originalfilename
===
undefined
)
{
await
Mainimg
.
findByIdAndUpdate
(
newMainimg
.
_id
,
{
theme
:
theme
,
...
...
@@ -57,13 +57,13 @@ export const updateOneMainimg = async (
city
:
city
,
title
:
title
,
});
await
FileInfo
.
findByIdAndUpdate
(
newMainimg
.
pic
.
_id
,
{
await
FileInfo
.
findByIdAndUpdate
(
newMainimg
.
fileInfo
.
_id
,
{
originalfilename
:
originalfilename
,
newfilename
:
newfilename
,
});
console
.
log
(
"
error6
"
);
}
else
{
await
FileInfo
.
findByIdAndUpdate
(
newMainimg
.
pic
.
_id
,
{
await
FileInfo
.
findByIdAndUpdate
(
newMainimg
.
fileInfo
.
_id
,
{
originalfilename
:
originalfilename
,
newfilename
:
newfilename
,
});
...
...
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