Fix bug
This commit is contained in:
		
							parent
							
								
									160185b108
								
							
						
					
					
						commit
						31aaf559ac
					
				
					 2 changed files with 8 additions and 6 deletions
				
			
		| 
						 | 
					@ -1,4 +1,3 @@
 | 
				
			||||||
import $ from 'cafy';
 | 
					 | 
				
			||||||
import Note from '../../../../models/note';
 | 
					import Note from '../../../../models/note';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const meta = {
 | 
					export const meta = {
 | 
				
			||||||
| 
						 | 
					@ -11,9 +10,11 @@ export const meta = {
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export default (params: any) => new Promise(async (res, rej) => {
 | 
					export default (params: any) => new Promise(async (res, rej) => {
 | 
				
			||||||
	const query = [{
 | 
						const query = [{
 | 
				
			||||||
 | 
							$match: {
 | 
				
			||||||
			createdAt: {
 | 
								createdAt: {
 | 
				
			||||||
				$gt: new Date(new Date().setFullYear(new Date().getFullYear() - 1))
 | 
									$gt: new Date(new Date().setFullYear(new Date().getFullYear() - 1))
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}, {
 | 
						}, {
 | 
				
			||||||
		$project: {
 | 
							$project: {
 | 
				
			||||||
			renoteId: '$renoteId',
 | 
								renoteId: '$renoteId',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,3 @@
 | 
				
			||||||
import $ from 'cafy';
 | 
					 | 
				
			||||||
import User from '../../../../models/user';
 | 
					import User from '../../../../models/user';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const meta = {
 | 
					export const meta = {
 | 
				
			||||||
| 
						 | 
					@ -11,9 +10,11 @@ export const meta = {
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export default (params: any) => new Promise(async (res, rej) => {
 | 
					export default (params: any) => new Promise(async (res, rej) => {
 | 
				
			||||||
	const query = [{
 | 
						const query = [{
 | 
				
			||||||
 | 
							$match: {
 | 
				
			||||||
			createdAt: {
 | 
								createdAt: {
 | 
				
			||||||
				$gt: new Date(new Date().setFullYear(new Date().getFullYear() - 1))
 | 
									$gt: new Date(new Date().setFullYear(new Date().getFullYear() - 1))
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}, {
 | 
						}, {
 | 
				
			||||||
		$project: {
 | 
							$project: {
 | 
				
			||||||
			host: '$host',
 | 
								host: '$host',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue