refactor(users): lots of auth stuff added to make it more easy to manage users
Some checks failed
Build and Push LST Docker Image / docker (push) Failing after 2m9s
Some checks failed
Build and Push LST Docker Image / docker (push) Failing after 2m9s
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
TooltipContent,
|
||||
TooltipTrigger,
|
||||
} from "../../components/ui/tooltip";
|
||||
import { api } from "../../lib/apiHelper";
|
||||
import { authClient } from "../../lib/auth-client";
|
||||
import { notificationSubs } from "../../lib/queries/notificationSubs";
|
||||
import { notifications } from "../../lib/queries/notifications";
|
||||
@@ -36,7 +37,7 @@ const updateNotifications = async (
|
||||
//console.log(id, data);
|
||||
try {
|
||||
const res = await axios.patch(
|
||||
`/lst/api/notification/${id}`,
|
||||
`/notification/${id}`,
|
||||
{ interval: data.interval },
|
||||
{
|
||||
withCredentials: true,
|
||||
@@ -110,7 +111,7 @@ const NotificationTable = () => {
|
||||
|
||||
const removeNotification = async (ns: any) => {
|
||||
try {
|
||||
const res = await axios.delete(`/lst/api/notification/sub`, {
|
||||
const res = await api.delete(`/notification/sub`, {
|
||||
withCredentials: true,
|
||||
data: {
|
||||
userId: ns.userId,
|
||||
@@ -168,7 +169,7 @@ const NotificationTable = () => {
|
||||
setActiveToggle(e);
|
||||
|
||||
try {
|
||||
const res = await axios.patch(
|
||||
const res = await api.patch(
|
||||
`/lst/api/notification/${i.row.original.id}`,
|
||||
{
|
||||
active: !activeToggle,
|
||||
|
||||
Reference in New Issue
Block a user