fix(backend): text: nullだけのノートは投稿できないように
				
					
				
			This commit is contained in:
		@@ -172,13 +172,32 @@ export const paramDef = {
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	// (re)note with text, files and poll are optional
 | 
			
		||||
	anyOf: [
 | 
			
		||||
		{ required: ['text'] },
 | 
			
		||||
		{ required: ['renoteId'] },
 | 
			
		||||
		{ required: ['fileIds'] },
 | 
			
		||||
		{ required: ['mediaIds'] },
 | 
			
		||||
		{ required: ['poll'] },
 | 
			
		||||
	],
 | 
			
		||||
	if: {
 | 
			
		||||
		properties: {
 | 
			
		||||
			renoteId: {
 | 
			
		||||
				type: 'null',
 | 
			
		||||
			},
 | 
			
		||||
			fileIds: {
 | 
			
		||||
				type: 'null',
 | 
			
		||||
			},
 | 
			
		||||
			mediaIds: {
 | 
			
		||||
				type: 'null',
 | 
			
		||||
			},
 | 
			
		||||
			poll: {
 | 
			
		||||
				type: 'null',
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	then: {
 | 
			
		||||
		properties: {
 | 
			
		||||
			text: {
 | 
			
		||||
				type: 'string',
 | 
			
		||||
				minLength: 1,
 | 
			
		||||
				maxLength: MAX_NOTE_TEXT_LENGTH,
 | 
			
		||||
				nullable: false,
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
} as const;
 | 
			
		||||
 | 
			
		||||
@Injectable()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user