@ -8,4 +8,20 @@ export default class ScoreRepo {
constructor(db) {
this.realmDB = db;
}
createScore = (user, score) => {
let scoreID = uuidv4();
this.realmDB.write(() => {
this.realmDB.create(
ScoreEntity.name,
{
id: scoreID,
user: user,
value: score,
},
true,
);
});
};