shalomweiss / mm-system-2017

MIT License
2 stars 2 forks source link

Issue with Login API #70

Closed Minitour closed 6 years ago

Minitour commented 6 years ago

Invalid response:

{
  "code": 200,
  "message": "success",
  "user": {
    "experience": "aaaaaaaaaaaaaaaa1",
    "role": "assasasas1",
    "company": 2,
    "volunteering": "aaaaaaaaaaaaaaa",
    "workHistory": "aaaaa",
    "id": 212,
    "firstName": "Haim",
    "lastName": "Alexandrovitch",
    "email": "ai",
    "phoneNumber": "456789",
    "gender": 1,
    "address": "555555",
    "note": "aaaaaaaaaaaaaaaaaaaaaaa",
    "active": true,
    "type": "MENTOR",
    "areaId": 2,
    "area": "Tsafon",
    "cityId": 2,
    "city": "Haifa",
    "joinDate": "Nov 8, 2017"
  },
  "token": "VziA1iHTghn4mD9JY4B2p6X39YT4Dv2vJ5puA5RGPcSQpUBaEjg0kezqMAfkcWXZLyuHz6XObyyEN9YA6NuzSrOnMWjL0bfKeq2jbIAaVADLDk4OH94FldXqthSt2kUW"
}

Where joinDate Expected: Long Got: String

NajibAbuSamra commented 6 years ago

@masterFoad are you using Data from java.util or sql? (in the db I see it as numbers only)

in the meeting with shalom we agreed that joinDate doesn't need to be long (we're not interested in the exact second the user joined), Date should be in the format YYYY-MM-DD

masterFoad commented 6 years ago

@Minitour Can you use a parser please?

Minitour commented 6 years ago
makeRequest: http://zofenweb-env.hhaqjxq9wa.us-east-2.elasticbeanstalk.com:80/LogIn
{"email":"ai","password":"OyACF5rx"}

onResponse:
 {"code":402,"message":"wrong password","user":{"experience":"aaaaaaaaaaaaaaaa1","role":"assasasas1","company":2,"volunteering":"aaaaaaaaaaaaaaa","workHistory":"aaaaa","id":212,"firstName":"Haim","lastName":"Alexandrovitch","email":"ai","phoneNumber":"456789","gender":1,"address":"555555","note":"aaaaaaaaaaaaaaaaaaaaaaa","active":true,"type":"MENTOR","areaId":2,"area":"Tsafon","cityId":2,"city":"Haifa","joinDate":"Nov 8, 2017"}}

Error code is 402 but user is still returned? @masterFoad

masterFoad commented 6 years ago

@Minitour Fixed.

NajibAbuSamra commented 6 years ago

please confirm and close