Skip to content

Commit

Permalink
fix: REST Frontend Routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachid Flih authored and Rachid Flih committed Aug 1, 2024
1 parent 4803f3f commit ae29362
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/webapp/src/hooks/create/useCreateApiKey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface IApiKeyDto {
// Adjusted useCreateApiKey hook to include a promise-returning function
const useCreateApiKey = () => {
const addApiKey = async (data: IApiKeyDto) => {
const response = await fetch(`${config.API_URL}/auth/generate-apikey`, {
const response = await fetch(`${config.API_URL}/auth/api_keys`, {
method: 'POST',
body: JSON.stringify(data),
headers: {
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/src/hooks/create/useCreateLinkedUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface ILinkedUserDto {
}
const useCreateLinkedUser = () => {
const add = async (linkedUserData: ILinkedUserDto) => {
const response = await fetch(`${config.API_URL}/linked-users/internal`, {
const response = await fetch(`${config.API_URL}/linked_users/internal`, {
method: 'POST',
body: JSON.stringify(linkedUserData),
headers: {
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/src/hooks/create/useCreateMagicLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface ILinkDto {

const useCreateMagicLink = () => {
const add = async (data: ILinkDto) => {
const response = await fetch(`${config.API_URL}/magic-links`, {
const response = await fetch(`${config.API_URL}/magic_links`, {
method: 'POST',
body: JSON.stringify(data),
headers: {
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/src/hooks/create/useRefreshAccessToken.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface IRefreshOutputDto {

const useRefreshAccessToken = () => {
const refreshAccessToken = async (projectId: string) => {
const response = await fetch(`${config.API_URL}/auth/refresh-token`, {
const response = await fetch(`${config.API_URL}/auth/refresh_tokens`, {
method: 'POST',
body: JSON.stringify({
projectId: projectId
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/src/hooks/get/useApiKeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const useApiKeys = () => {
return useQuery({
queryKey: ['api-keys'],
queryFn: async (): Promise<ApiKey[]> => {
const response = await fetch(`${config.API_URL}/auth/api-keys`,
const response = await fetch(`${config.API_URL}/auth/api_keys`,
{
method: 'GET',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/src/hooks/get/useFieldMappings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const useFieldMappings = () => {
return useQuery({
queryKey: ['mappings'],
queryFn: async (): Promise<Attribute[]> => {
const response = await fetch(`${config.API_URL}/field-mappings/attribute`,
const response = await fetch(`${config.API_URL}/field_mappings/attributes`,
{
method: 'GET',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/src/hooks/get/useLinkedUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const useLinkedUsers = () => {
return useQuery({
queryKey: ['linked-users'],
queryFn: async (): Promise<LinkedUser[]> => {
const response = await fetch(`${config.API_URL}/linked-users/internal`,
const response = await fetch(`${config.API_URL}/linked_users/internal`,
{
method: 'GET',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/src/hooks/get/useProviderProperties.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const useProviderProperties = (linkedUserId: string, providerId: string, vertica
return useQuery({
queryKey: ['providerProperties', linkedUserId, providerId, vertical],
queryFn: async () => {
const response = await fetch(`${config.API_URL}/field-mappings/properties?linkedUserId=${linkedUserId}&providerId=${providerId}&vertical=${vertical}`,
const response = await fetch(`${config.API_URL}/field_mappings/properties?linkedUserId=${linkedUserId}&providerId=${providerId}&vertical=${vertical}`,
{
method: 'GET',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/src/hooks/get/useWebhooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const useWebhooks = () => {
queryKey: ['webhooks'],
queryFn: async (): Promise<Webhook[]> => {
console.log("Webhook mutation called")
const response = await fetch(`${config.API_URL}/webhook/internal`,
const response = await fetch(`${config.API_URL}/webhooks/internal`,
{
method: 'GET',
headers: {
Expand Down

0 comments on commit ae29362

Please sign in to comment.