mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 04:51:16 +08:00
config is not required to load user data
This commit is contained in:
parent
4d816ec7eb
commit
bcff39081d
2 changed files with 4 additions and 2 deletions
|
@ -10,7 +10,7 @@ class ConfigDAO {
|
|||
|
||||
static async getConfig(uid) {
|
||||
let config = await mongoDB().collection("configs").findOne({ uid });
|
||||
if (!config) throw new MonkeyError(404, "Config not found");
|
||||
// if (!config) throw new MonkeyError(404, "Config not found");
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,7 +83,9 @@ export async function initSnapshot() {
|
|||
|
||||
let configData = await axiosInstance.get("/config");
|
||||
configData = configData.data;
|
||||
snap.config = configData.config;
|
||||
if (configData) {
|
||||
snap.config = configData.config;
|
||||
}
|
||||
|
||||
let tagsData = await axiosInstance.get("/user/tags");
|
||||
snap.tags = tagsData.data;
|
||||
|
|
Loading…
Reference in a new issue