2016-04-11 6 views

答えて

0

が終わった

IF email already exists AND verified equals false 
    THEN allow PUT 
IF email already exists AND verified equals true 
    THEN don't allow PUT 
IF email does not exist 
    THEN allow PUT 

乾杯より洗練された方法でそれを見つけ出す:

query.Item = { 
    email: email, 
    verified: false, 
    verifyToken: token 
}; 

query.ExpressionAttributeNames = { 
    '#verified' : 'verified' 
}; 

query.ExpressionAttributeValues = { 
    ':false' : false, 
}; 

query.ConditionExpression = '#verified = :false OR attribute_not_exists(verified)'; 
関連する問題