api_server/modules/users/gitlens_user_request.js
// require certain parameters, discard unknown parameters
require certain parameters, discard unknown parameters
require certain parameters discard unknown parameters
async requireAndAllow () {
		await this.requireAllowParameters(
			'body',
			{
				required: {
					string: ['emailHash']
				},
				optional: {
					string: ['machineIdHash']
				}
			}
		);
		if (this.request.body.emailHash.length > 200) {
			throw this.errorHandler.error('invalidParameter', { reason: 'emailHash must be less than 200 characters'});
		}
		if (this.request.body.machineIdHash && this.request.body.machineIdHash.length > 200) {
			throw this.errorHandler.error('invalidParameter', { reason: 'machineIdHash must be less than 200 characters'})
		} 
	}
async requireAndAllow ( ) { await this . requireAllowParameters ( 'body' , { required : { string : [ 'emailHash' ] } , optional : { string : [ 'machineIdHash' ] } } ) ; if ( this . request . body . emailHash . length > 200 ) { throw this . errorHandler . error ( 'invalidParameter' , { reason : 'emailHash must be less than 200 characters' } ) ; } if ( this . request . body . machineIdHash && this . request . body . machineIdHash . length > 200 ) { throw this . errorHandler . error ( 'invalidParameter' , { reason : 'machineIdHash must be less than 200 characters' } ) } }
require certain parameters, discard unknown parameters
require certain parameters discard unknown parameters