Skip to content

Commit

Permalink
fix: imgBb create
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio Brasileiro authored and Fabio Brasileiro committed Sep 16, 2024
1 parent 2158a66 commit 2c1d84b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/controllers/productController.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import 'dotenv/config'
import type { Product } from '@/@types/productTypes'
import type { Request, Response } from 'express'
import * as productService from '../services/productService'
import { uploadImage } from '../services/imgBbServices'
import axios from 'axios'

import imgbbUploader from 'imgbb-uploader'
import fs from 'fs'
import path from 'path'

import imgbbUploader from 'imgbb-uploader'
export const createProduct = async (req: Request, res: Response) => {
console.log(process.env.IMGBB_API_KEY)
try {
const productData: Product | any = req.body
const base64Image: string = req.body.imageUrl // A imagem vem como base64 no corpo da requisição
Expand Down

0 comments on commit 2c1d84b

Please sign in to comment.