File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,19 @@ import { type ICourses, type CloudinaryUploadResult } from "@/interface";
7
7
import { PaperAdmin } from "@/db/papers" ;
8
8
import axios from "axios" ;
9
9
// TODO: REMOVE THUMBNAIL FROM admin-buffer DB
10
- cloudinary . v2 . config ( {
11
- cloud_name : process . env . NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME ,
12
- api_key : process . env . CLOUDINARY_API_KEY ,
13
- api_secret : process . env . CLOUDINARY_SECRET ,
10
+ const cloudinaryConfig1 = cloudinary . v2 ;
11
+ cloudinaryConfig1 . config ( {
12
+ cloud_name : process . env . NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME_1 ,
13
+ api_key : process . env . CLOUDINARY_API_KEY_1 ,
14
+ api_secret : process . env . CLOUDINARY_SECRET_1 ,
15
+ } ) ;
16
+
17
+ // Config 2: Secondary Cloudinary account
18
+ const cloudinaryConfig2 = cloudinary . v2 ;
19
+ cloudinaryConfig2 . config ( {
20
+ cloud_name : process . env . NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME_2 ,
21
+ api_key : process . env . CLOUDINARY_API_KEY_2 ,
22
+ api_secret : process . env . CLOUDINARY_SECRET_2 ,
14
23
} ) ;
15
24
16
25
export async function POST ( req : Request ) {
You can’t perform that action at this time.
0 commit comments