API 1.0.49 FirebaseRegistrationToken
This commit is contained in:
parent
9f6df1ff5a
commit
3ace3eeeba
@ -11,7 +11,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "com.aitrainer"
|
||||
version = "1.0.48"
|
||||
version = "1.0.49"
|
||||
java.sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
repositories {
|
||||
|
10
data/db/update_1_0_49.sql
Normal file
10
data/db/update_1_0_49.sql
Normal file
@ -0,0 +1,10 @@
|
||||
START TRANSACTION;
|
||||
|
||||
|
||||
ALTER TABLE `customer`
|
||||
ADD COLUMN `firebase_reg_token` CHAR(100) NULL DEFAULT NULL AFTER `trial_date`;
|
||||
|
||||
|
||||
UPDATE configuration set config_value = "1.0.49", date_change=CURRENT_DATE WHERE config_key = "db_version";
|
||||
|
||||
COMMIT;
|
@ -123,6 +123,9 @@ class CustomerController ( private val customerRepository: CustomerRepository) {
|
||||
if (newCustomer.trialDate != null) {
|
||||
updatedCustomer.trialDate = newCustomer.trialDate
|
||||
}
|
||||
if (newCustomer.firebaseRegToken != null) {
|
||||
updatedCustomer.firebaseRegToken = newCustomer.firebaseRegToken
|
||||
}
|
||||
updatedCustomer.sex = newCustomer.sex
|
||||
updatedCustomer.birthYear = newCustomer.birthYear
|
||||
updatedCustomer.fitnessLevel = newCustomer.fitnessLevel
|
||||
|
@ -28,6 +28,7 @@ data class Customer (
|
||||
@Expose var emailSubscription: Int? = 0,
|
||||
@Expose var syncedDate: String? = null,
|
||||
@Expose var trialDate: String? = null,
|
||||
@Expose var firebaseRegToken: String? = null,
|
||||
|
||||
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Expose var customerId: Long = 0,
|
||||
)
|
||||
|
@ -17,6 +17,6 @@ logging.config=classpath:logback-spring.xml
|
||||
logging.file=logs
|
||||
|
||||
# if the database structure has been changed, increment this version number
|
||||
application.version=1.0.48
|
||||
application.version=1.0.49
|
||||
|
||||
jwt.secret=aitrainer
|
@ -17,7 +17,7 @@ logging.config=classpath:logback-spring.xml
|
||||
logging.file=logs
|
||||
|
||||
# if the database structure has been changed, increment this version number
|
||||
application.version=1.0.48
|
||||
application.version=1.0.49
|
||||
|
||||
jwt.secret=aitrainer
|
||||
jasypt.encryptor.password=Tibor
|
||||
|
@ -73,6 +73,7 @@ class AppCustomerPackageTest {
|
||||
assertEquals(customer.birthYear, 1972)
|
||||
assertEquals(customer.trialDate, "2021-08-07 08:00:00")
|
||||
assertEquals(customer.syncedDate, "2021-08-06 08:00:00")
|
||||
assertEquals(customer.firebaseRegToken, "123456789asdfghjkl")
|
||||
}
|
||||
record[0] == Exercises::class.simpleName -> {
|
||||
val exercisesJson: String = record[1]
|
||||
|
@ -114,6 +114,7 @@ class CustomerTests {
|
||||
customer.email = "mr@aitrainer.app"
|
||||
customer.emailSubscription = 1
|
||||
customer.sportId = 2
|
||||
customer.firebaseRegToken = "123456789asdfghjkl"
|
||||
|
||||
|
||||
var updatedCustomer = customerRepository.save(customer)
|
||||
@ -124,7 +125,7 @@ class CustomerTests {
|
||||
assertEquals(updatedCustomer.email, "mr@aitrainer.app")
|
||||
assertEquals(updatedCustomer.dataPolicyAllowed, 1)
|
||||
assertEquals(updatedCustomer.emailSubscription, 1)
|
||||
assertEquals(updatedCustomer.sportId, 2)
|
||||
assertEquals(updatedCustomer.firebaseRegToken, "123456789asdfghjkl")
|
||||
|
||||
|
||||
customer.email = "sw@andio.biz"
|
||||
|
Loading…
Reference in New Issue
Block a user