remove extra api for changing theme
This commit is contained in:
@@ -5103,7 +5103,6 @@ func initHandlers() {
|
||||
r.HandleFunc("/api/v1/users/{key}/get2fa", shuffle.HandleGet2fa).Methods("GET", "OPTIONS")
|
||||
r.HandleFunc("/api/v1/users/{key}/set2fa", shuffle.HandleSet2fa).Methods("POST", "OPTIONS")
|
||||
r.HandleFunc("/api/v1/users", shuffle.HandleGetUsers).Methods("GET", "OPTIONS")
|
||||
r.HandleFunc("/api/v1/users/{userid}/theme", shuffle.HandleSetUserTheme).Methods("POST", "OPTIONS")
|
||||
|
||||
// General - duplicates and old.
|
||||
r.HandleFunc("/api/v1/getusers", shuffle.HandleGetUsers).Methods("GET", "OPTIONS")
|
||||
|
||||
@@ -450,15 +450,16 @@ const LeftSideBar = ({ userdata, serverside, globalUrl, notifications, }) => {
|
||||
};
|
||||
|
||||
const handleUpdateTheme = (newTheme) => {
|
||||
|
||||
|
||||
const data = {
|
||||
"user_id": userdata?.id,
|
||||
"theme": newTheme,
|
||||
}
|
||||
|
||||
const url = globalUrl + `/api/v1/users/${userdata?.id}/theme`;
|
||||
const url = globalUrl + `/api/v1/users/updateuser`;
|
||||
fetch(url, {
|
||||
mode: "cors",
|
||||
method: "POST",
|
||||
method: "PUT",
|
||||
body: JSON.stringify(data),
|
||||
credentials: "include",
|
||||
crossDomain: true,
|
||||
|
||||
Reference in New Issue
Block a user