mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Feat: add create brewery post, brewery image upload
Add address autocomplete, using MapBox
This commit is contained in:
@@ -12,7 +12,7 @@ import { NextApiResponse } from 'next';
|
||||
import { z } from 'zod';
|
||||
import ServerError from '@/config/util/ServerError';
|
||||
import validateRequest from '@/config/nextConnect/middleware/validateRequest';
|
||||
import processImageDataIntoDB from '@/services/BeerImage/processImageDataIntoDB';
|
||||
import addBeerImageToDB from '@/services/BeerImage/addBeerImageToDB';
|
||||
import ImageMetadataValidationSchema from '@/services/types/ImageSchema/ImageMetadataValidationSchema';
|
||||
|
||||
const { storage } = cloudinaryConfig;
|
||||
@@ -50,7 +50,7 @@ const processImageData = async (
|
||||
throw new ServerError('No images uploaded', 400);
|
||||
}
|
||||
|
||||
const beerImages = await processImageDataIntoDB({
|
||||
const beerImages = await addBeerImageToDB({
|
||||
alt: body.alt,
|
||||
caption: body.caption,
|
||||
beerPostId: req.query.id,
|
||||
|
||||
Reference in New Issue
Block a user