refactor(server/utils): create gridfs bucket for draft contents
This commit is contained in:
		
							parent
							
								
									dd74c8417a
								
							
						
					
					
						commit
						90b0256008
					
				
							
								
								
									
										9
									
								
								lib/server/storyHelpers/getDraftBucket.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								lib/server/storyHelpers/getDraftBucket.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | ||||
| import { GridFSBucket } from "mongodb"; | ||||
| import mongoose from "mongoose"; | ||||
| 
 | ||||
| export default function () { | ||||
| 	// @ts-ignore SHUT UP MEG
 | ||||
| 	return new GridFSBucket(mongoose.connection.db, { | ||||
| 		bucketName: "draft_text", | ||||
| 	}); | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user