API 1.0.54 customer.lang update

This commit is contained in:
Tibor Bossanyi (Freelancer) 2021-11-30 20:29:29 +01:00
parent 28482e9a2b
commit 357c9be0b7
2 changed files with 5 additions and 0 deletions

View File

@ -126,6 +126,9 @@ class CustomerController ( private val customerRepository: CustomerRepository) {
if (newCustomer.firebaseRegToken != null) {
updatedCustomer.firebaseRegToken = newCustomer.firebaseRegToken
}
if (newCustomer.lang != null) {
updatedCustomer.lang = newCustomer.lang
}
updatedCustomer.sex = newCustomer.sex
updatedCustomer.birthYear = newCustomer.birthYear
updatedCustomer.fitnessLevel = newCustomer.fitnessLevel

View File

@ -117,6 +117,7 @@ class CustomerTests {
customer.firebaseRegToken = "123456789asdfghjkl"
customer.phone = "123456"
customer.lifeLong = 1
customer.lang = "de"
var updatedCustomer = customerRepository.save(customer)
@ -130,6 +131,7 @@ class CustomerTests {
assertEquals(updatedCustomer.firebaseRegToken, "123456789asdfghjkl")
assertEquals(updatedCustomer.phone, "123456")
assertEquals(updatedCustomer.lifeLong, 1)
assertEquals(updatedCustomer.lang, "de")
customer.email = "sw@andio.biz"