mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			434 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			434 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| path = require('path'),
 | |
| pathThumbnails = __dirname;
 | |
| db = require(pathThumbnails + '/../handlers/db.js');
 | |
| 
 | |
| db.getCollectionNames(function(err, docs) {
 | |
|     for(var i = 0; i < docs.length; i++) {
 | |
|         addType(docs[i]);
 | |
|     }
 | |
| })
 | |
| 
 | |
| function addType(name) {
 | |
|     db.collection(name).update({duration: {$exists: true},type:{$ne:"suggested"}}, {$set: { type: "video" }}, {multi: true}, function(err, doc) {
 | |
|         process.exit();
 | |
|     });
 | |
| }
 |