Move UserPFP Backup DB To New Domain

This commit is contained in:
thororen1234 2025-01-27 10:10:08 -05:00
parent 168e4ddd1e
commit 0d118cd8ee

View file

@ -23,18 +23,18 @@ const settings = definePluginSettings({
{ label: "Nitro", value: true, default: true }, { label: "Nitro", value: true, default: true },
], ],
}, },
urlForDB: { databaseToUse: {
type: OptionType.SELECT, type: OptionType.SELECT,
description: "Which Database url to use to load avatars, KNOW WHAT YOUR DOING", description: "Which Database url to use to load avatars, KNOW WHAT YOUR DOING",
options: [ options: [
{ {
label: "UserPFP Default DB", label: "UserPFP Main DB",
value: "https://userpfp.github.io/UserPFP/source/data.json", value: "https://userpfp.github.io/UserPFP/source/data.json",
default: true default: true
}, },
{ {
label: "UserPFP Backup DB", label: "UserPFP Backup DB",
value: "https://userpfp.thororen.com/data.json" value: "https://userpfp.equicord.fyi/data.json"
} }
] ]
} }
@ -74,7 +74,7 @@ export default definePlugin({
return data.avatars[user.id] ?? original(user, animated, size); return data.avatars[user.id] ?? original(user, animated, size);
}, },
async start() { async start() {
const res = await fetch(settings.store.urlForDB) await fetch(settings.store.databaseToUse)
.then(async res => { .then(async res => {
if (res.ok) this.data = data = await res.json(); if (res.ok) this.data = data = await res.json();
}) })