996 feature deduct points when a daily task is cancelled - #1013
Conversation
…nts-when-a-daily-task-is-cancelled # Conflicts: # src/__tests__/dailyTasks/formAnInnerConnection.test.ts
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
| ); | ||
| if (unreserveErrors) return cancelTransaction(newSession, unreserveErrors); | ||
|
|
||
| return endTransaction(newSession, wasUnreserved); |
There was a problem hiding this comment.
Just wondering, that should this be asynchronous return statement like this:
return await endTransaction(newSession, wasUnreserved);
I noticed, that elsewhere in the code base we have used statements like that.
| TASK_CONSTS.POINTS.DAILY_TASK.CANCEL_PENALTY, | ||
| session, | ||
| ); | ||
| if (deductionErrors) return cancelTransaction(session, deductionErrors); |
tickBit
left a comment
There was a problem hiding this comment.
I think it would safer to use await in those return statements.
Please include also some output from testing the implementation.
Provided through Codex @tickBit
|
tickBit
left a comment
There was a problem hiding this comment.
Seems good and working solution 👍 . Approved.
With testing output I meant some kind of runtime output via Postman or similar, or from command line using curl or something like that. But I believe, that this is a working solution 👍
Oh, understood. I tested this via Swagger and established it as functional, Postman wasn't strictly needed for this i think, as i was able to log in and test this as a previously created test -profile. I can provide more proof if needed, but through swagger and automated tests everything seems to work as expected 😊 |
I'm pretty sure, that this works as expected, no need for more proof :-) |

Brief description
Adds a 10 point (regular) penalty when a player relinquishes an active daily task. The penalty is applied when unreserving, switching to another task, or deleting an owned task. Released tasks return to the pool as fresh tasks, and all cancellation changes run transactionally.
Change list
TASK_CONSTS.POINTS.DAILY_TASK.CANCEL_PENALTYfrom regular player points.closes #996