rhoolan / letterMatchd_CLI

CLI program for comparing Letterboxd users compatibility
0 stars 0 forks source link

BUG || watched.js || Prevent score cache from storing the same two users twice. #7

Open rhoolan opened 3 months ago

rhoolan commented 3 months ago

Currently it will store userOne - userTwo

This is a problem because it could cause the same two users to be saved twice.

EX: (abc - def) and (def - abc).

SOLUTION: Sort userNames alphabetically and then store them in the cash

EX userOne = abc, userTwo = def : cache = abc-def userOne = def, userTwo = abc : cache = abc-def

rhoolan commented 3 months ago

Need to write unit tests