update: checkIfRoomUnlocked
aaryankotharii opened this issue · comments
Aaryan Kothari commented
the current response is
{
unlock: true,
stars:3635
}
change to:
{
status: locked / unlocked/ complete/ canUnlock,
stars:3635
}
- canUnlock if roomUnlocked is false and stars == 0
- locked if roomUnlocked is false and stars > 0
- complete is journey.questionsStatus == ["solved","solved","solved"]
- else unlocked
stars: logic remains same.
Aaryan Kothari commented
@IEEE-VIT/enigma-backend @IEEE-VIT/enigma-ios @IEEE-VIT/enigma-android
Aaryan Kothari commented
@IEEE-VIT/enigma-ios @IEEE-VIT/enigma-android
when user taps on a room
if status == complete {
show "ROOM COMPLETE" popup
}
if status == canUnlock {
show selectPowerupView
}
if status == complete {
show "ROOM COMPLETE" popup
}
if status == locked {
show {star} stars required to unlock room
}
Aaryan Kothari commented
@IEEE-VIT/enigma-frontend ⬆️
Varun Murpani commented
@aaryankotharii problem w this is... when the room is "locked", the journey wont exist and thats the error message we would get
Aaryan Kothari commented
if journey does not exist then send locked
Varun Murpani commented
Aaryan Kothari commented
13:05:36.463 💙 INFO APIClient.handleJSON():35 - {
"success" : true,
"data" : {
"status" : "locked",
"starsNeeded" : 0
}
}
@varun I shall be getting canUnlock in this case. please check ASAP
Aaryan Kothari commented
@IEEE-VIT/enigma-backend I beleive #180 will solve this. this very imp, please look into it.
Shubham Palriwala commented
Will be merged by #180