MM_22682_Centralize_ID_Validation (#14237)
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ef5ac519d9
Коммит
882b0324b5
@@ -17,11 +17,11 @@ type UserTermsOfService struct {
|
||||
}
|
||||
|
||||
func (ut *UserTermsOfService) IsValid() *AppError {
|
||||
if len(ut.UserId) != 26 {
|
||||
if !IsValidId(ut.UserId) {
|
||||
return InvalidUserTermsOfServiceError("user_id", ut.UserId)
|
||||
}
|
||||
|
||||
if len(ut.TermsOfServiceId) != 26 {
|
||||
if !IsValidId(ut.TermsOfServiceId) {
|
||||
return InvalidUserTermsOfServiceError("terms_of_service_id", ut.UserId)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user