Skip to content

Commit

Permalink
update URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Oct 15, 2024
1 parent d3ac251 commit 759fb37
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion webapp/src/Routes/Connection/Download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type Props = {
export function Download({id, name}:Props) {
const {authInfo} = useAuthContext();
const handleDownload = () => {
fetch(AppSettings.url + '/connection/'+id, {
fetch(AppSettings.url + '/vpn/connection/'+id, {
headers: {
"Authorization": "Bearer " + authInfo.token
},
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/Routes/Connection/ListConnections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function ListConnections() {
const { isPending, error, data } = useQuery({
queryKey: ['connections'],
queryFn: () =>
fetch(AppSettings.url + '/connections', {
fetch(AppSettings.url + '/vpn/connections', {
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer " + authInfo.token
Expand All @@ -30,7 +30,7 @@ export function ListConnections() {
})
const deleteConnection = useMutation({
mutationFn: (id:string) => {
return axios.delete(AppSettings.url + '/connection/'+id, {
return axios.delete(AppSettings.url + '/vpn/connection/'+id, {
headers: {
"Authorization": "Bearer " + authInfo.token
},
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/Routes/Connection/NewConnection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function NewConnection() {
const alertIcon = <TbInfoCircle />
const newConnection = useMutation({
mutationFn: () => {
return axios.post(AppSettings.url + '/connections', {}, {
return axios.post(AppSettings.url + '/vpn/connections', {}, {
headers: {
"Authorization": "Bearer " + authInfo.token
},
Expand All @@ -34,7 +34,7 @@ export function NewConnection() {
const { isPending, error, data } = useQuery({
queryKey: ['connectionlicense'],
queryFn: () =>
fetch(AppSettings.url + '/connectionlicense', {
fetch(AppSettings.url + '/vpn/connectionlicense', {
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer " + authInfo.token
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/Routes/Home/UserStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function UserStats() {
const { isPending, error, data } = useQuery({
queryKey: ['userstats', statsDate, unit],
queryFn: () =>
fetch(AppSettings.url + '/stats/user/' + format(statsDate === null ? new Date() : statsDate, "yyyy-MM-dd") + "?offset="+timezoneOffset+"&unit=" +unit, {
fetch(AppSettings.url + '/vpn/stats/user/' + format(statsDate === null ? new Date() : statsDate, "yyyy-MM-dd") + "?offset="+timezoneOffset+"&unit=" +unit, {
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer " + authInfo.token
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/Routes/PacketLogs/PacketLogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function PacketLogs() {
const { isPending, fetchNextPage, hasNextPage, error, data } = useInfiniteQuery<LogsDataResponse>({
queryKey: ['packetlogs', user, logsDate, logType, searchParam],
queryFn: async ({ pageParam }) =>
fetch(AppSettings.url + '/stats/packetlogs/'+(user === undefined || user === "" ? "all" : user)+'/'+(logsDate == undefined ? getDate(new Date()) : getDate(logsDate)) + "?pos="+pageParam+"&offset="+timezoneOffset+"&logtype="+encodeURIComponent(logType.join(","))+"&search="+encodeURIComponent(searchParam), {
fetch(AppSettings.url + '/vpn/stats/packetlogs/'+(user === undefined || user === "" ? "all" : user)+'/'+(logsDate == undefined ? getDate(new Date()) : getDate(logsDate)) + "?pos="+pageParam+"&offset="+timezoneOffset+"&logtype="+encodeURIComponent(logType.join(","))+"&search="+encodeURIComponent(searchParam), {
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer " + authInfo.token
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/Routes/Setup/Restart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function Restart() {
const alertIcon = <TbInfoCircle />;
const setupMutation = useMutation({
mutationFn: () => {
return axios.post(AppSettings.url + '/setup/restart-vpn', {}, {
return axios.post(AppSettings.url + '/vpn/setup/restart-vpn', {}, {
headers: {
"Authorization": "Bearer " + authInfo.token
},
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/Routes/Setup/TemplateSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function TemplateSetup() {
const { isPending, error, data, isSuccess } = useQuery({
queryKey: ['templates-setup'],
queryFn: () =>
fetch(AppSettings.url + '/setup/templates', {
fetch(AppSettings.url + '/vpn/setup/templates', {
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer " + authInfo.token
Expand All @@ -44,7 +44,7 @@ export function TemplateSetup() {
const alertIcon = <TbInfoCircle />;
const setupMutation = useMutation({
mutationFn: (setupRequest: TemplateSetupRequest) => {
return axios.post(AppSettings.url + '/setup/templates', setupRequest, {
return axios.post(AppSettings.url + '/vpn/setup/templates', setupRequest, {
headers: {
"Authorization": "Bearer " + authInfo.token
},
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/Routes/Setup/VPNSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function VPNSetup() {
const { isPending, error, data, isSuccess } = useQuery({
queryKey: ['vpn-setup'],
queryFn: () =>
fetch(AppSettings.url + '/setup/vpn', {
fetch(AppSettings.url + '/vpn/setup/vpn', {
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer " + authInfo.token
Expand Down Expand Up @@ -64,7 +64,7 @@ export function VPNSetup() {
});
const setupMutation = useMutation({
mutationFn: (setupRequest: VPNSetupRequest) => {
return axios.post(AppSettings.url + '/setup/vpn', setupRequest, {
return axios.post(AppSettings.url + '/vpn/setup/vpn', setupRequest, {
headers: {
"Authorization": "Bearer " + authInfo.token
},
Expand Down

0 comments on commit 759fb37

Please sign in to comment.