This week started with me trying to update the REST API to accept multi-piece scoring and update the computation algorithm to handle multiple scores. I’ve modified the REST API to accept multi-piece scoring from the front-end but there is an error when I tried to run the system.
ERROR : CREATE UNIQUE INDEX
From the error information, I know that it is about the security of the system. Create unique index syntax is duplicate values are not allowed which means judges can only score the performer for one time only. From the current situation now, REST API can’t accept the multi-piece scoring that I’ve modified because of the security issue in the database. Dr. Shawn told me there are two solutions to this problem. The easiest way is to delete the create unique index of the scores received which we both know deleting one of the security features of the system will allow more issues in the future. The next solution is to RE-DO meaning I need to change the back-end into original and adding a new field which is “scores” in the front-end. Now, the front-end will do the average score calculation part of the absolute score, not the back-end of the system. So, back-end will only receive one score which is the average of the absolute score and it follows the security of the system which is no duplicate values allowed. The new field scores will save the multi-piece scoring that it received from the judges in a string. I’m using join() method to join the elements of an array into a string. The elements will be separated by a specified separator. This is how it looks when the judges score the performer with multi-piece performance.
absolute 80
comparative 0
judgingId 62
performanceId 230
scores 84:76
I learnt using new tool this week which is RESTED. RESTED is a debugger for RESTful web services which helps my works as effectively as possible. Many more to come next week as I expecting myself to complete the front-end part of the system. Wish me luck 🙂
0 Comments