mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 15:26:15 +08:00
collection name typos
This commit is contained in:
parent
c25986e407
commit
032621a0d8
|
@ -16,7 +16,7 @@ class ResultDAO {
|
|||
}
|
||||
|
||||
static async editResultTags(uid, id, tags) {
|
||||
const result = await mongoDB().collection("result").findOne({ id, uid });
|
||||
const result = await mongoDB().collection("results").findOne({ id, uid });
|
||||
if (!result) throw new MonkeyError(404, "Result not found");
|
||||
const userTags = await UserDAO.getTags(uid);
|
||||
let validTags = true;
|
||||
|
@ -31,7 +31,7 @@ class ResultDAO {
|
|||
}
|
||||
|
||||
static async getResult(uid, id) {
|
||||
const result = await mongoDB().collection("result").findOne({ id, uid });
|
||||
const result = await mongoDB().collection("results").findOne({ id, uid });
|
||||
if (!result) throw new MonkeyError(404, "Result not found");
|
||||
return result;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class ResultDAO {
|
|||
start = start ?? 0;
|
||||
end = end ?? 1000;
|
||||
const result = await mongoDB()
|
||||
.collection("result")
|
||||
.collection("results")
|
||||
.find({ uid })
|
||||
.sort({ timestamp: -1 })
|
||||
.skip(start)
|
||||
|
|
Loading…
Reference in a new issue