Skip to content

Commit

Permalink
update blogs
Browse files Browse the repository at this point in the history
  • Loading branch information
JaberHPranto committed Oct 10, 2021
1 parent cb31017 commit 297f2da
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 91 deletions.
85 changes: 0 additions & 85 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"react-dom": "^17.0.2",
"react-google-login": "^5.2.2",
"react-html-parser": "^2.0.2",
"react-quill": "^1.3.5",
"react-redux": "^7.2.4",
"react-router-bootstrap": "^0.25.0",
"react-router-dom": "^5.2.0",
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Blog/BlogDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Badge, Container } from 'react-bootstrap'
import ReactHtmlParser from 'react-html-parser'
import { useDispatch, useSelector } from 'react-redux'
import { fetchBlogById } from '../../redux/actions/blogActions'
import '../../styles/bl2og.css'
import '../../styles/blog.css'
import Loader from '../Ecommerce/Loader'
import Message from '../Ecommerce/Message'

Expand Down
3 changes: 1 addition & 2 deletions client/src/components/Blog/NewBlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ function NewBlog() {
const dispatch = useDispatch()

const [title, setTitle] = useState("")
const [description, setDescription] = useState("")
const [category, setCategory] = useState("")
const [tags, setTags] = useState("")
const [image, setImage] = useState("")
Expand Down Expand Up @@ -62,7 +61,7 @@ function NewBlog() {

const clearInputs = () => {
setTitle("")
setDescription("")
setContent("")
setTags("")
setCategory("")
setImage("")
Expand Down
4 changes: 2 additions & 2 deletions server/routes/uploadRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ router.post('/', upload.single('image'), async (req, res) => {
}
})

router.post('/ck-image', multipartMiddleware, function(req, res) {
router.post('/ck-image', multipartMiddleware, async function(req, res) {
const tempFile = req.files.upload.path
console.log(req.files);
try {
res.status(200).json({
uploaded: true,
url: `${hostUrl}/${tempFile}`

})
} catch (err) {
console.log(err);
Expand Down

0 comments on commit 297f2da

Please sign in to comment.