Add username to web app and state api (#50)
This commit is contained in:
1 parent
5baab67bb4
commit
71453237c4
5 files changed
+26
-6
No files matched your search
@@ -36,11 +36,16 @@ namespace InvidiousSettings
|
||||
return instances[0]
|
||||
end function
|
||||
|
||||
function SetAuthToken(token as string, instance as string)
|
||||
json = FormatJson({
|
||||
function SetAuthToken(token as string, instance as string, username as dynamic)
|
||||
obj = {
|
||||
token: token,
|
||||
instance: instance
|
||||
})
|
||||
}
|
||||
if username <> invalid
|
||||
obj.username = username
|
||||
end if
|
||||
|
||||
json = FormatJson(obj)
|
||||
RegistryUtils.Write(RegistryUtils.INVIDIOUS_TOKEN, json)
|
||||
|
||||
instances = InvidiousSettings.GetCurrentInstances()
|
||||
|
||||
Reference in new issue
Block a user