add: company info & edit company view
This commit is contained in:
@@ -2,7 +2,7 @@ import api from "../lib/axios";
|
||||
|
||||
export const getLoadDirectories = async(filterStr) => {
|
||||
try {
|
||||
const endpoint = `/public-loads${filterStr}`;
|
||||
const endpoint = `/v1/public-loads${filterStr}`;
|
||||
const {data} = await api.get(endpoint);
|
||||
return data.data;
|
||||
} catch (error) {
|
||||
@@ -13,7 +13,7 @@ export const getLoadDirectories = async(filterStr) => {
|
||||
|
||||
export const getVehicleDirectories = async(filter) => {
|
||||
try {
|
||||
const endpoint = `/public-vehicles/published${filter}`;
|
||||
const endpoint = `/v1/public-vehicles/published${filter}`;
|
||||
const {data} = await api.get(endpoint);
|
||||
return data.data;
|
||||
} catch (error) {
|
||||
@@ -25,7 +25,7 @@ export const getVehicleDirectories = async(filter) => {
|
||||
export const getFreeVehicles = async() => {
|
||||
try {
|
||||
// console.log(process.env.API_URL + "/vehicles/?status=Free&updatedAt[$gt]=" + moment.utc(lasthour).valueOf());
|
||||
const endpoint = `/public-vehicles/location`;
|
||||
const endpoint = `/v1/public-vehicles/location`;
|
||||
console.log({endpoint});
|
||||
const {data} = await api.get(endpoint);
|
||||
return data.data;
|
||||
@@ -50,7 +50,7 @@ export const getNews = async() => {
|
||||
|
||||
export const getCompanies = async(filter) => {
|
||||
try {
|
||||
const endpoint = `/public-companies/${filter}`;
|
||||
const endpoint = `/v1/public-companies/${filter}`;
|
||||
console.log(endpoint);
|
||||
const {data} = await api.get(endpoint);
|
||||
return data.data;
|
||||
@@ -62,7 +62,7 @@ export const getCompanies = async(filter) => {
|
||||
|
||||
export const getUsersCompany = async(filter) => {
|
||||
try {
|
||||
const endpoint = `/users?${filter}`;
|
||||
const endpoint = `/v1/users?${filter}`;
|
||||
// console.log({endpoint});
|
||||
const {data} = await api.get(endpoint);
|
||||
// console.log(data);
|
||||
@@ -86,7 +86,7 @@ export const getSettingsQuery = async(filter) => {
|
||||
|
||||
export const searchcategories = async(query) => {
|
||||
try {
|
||||
const endpoint = "/product-categories/find?regex=" + query;
|
||||
const endpoint = "/v1/product-categories/find?regex=" + query;
|
||||
const {data} = await api.get(endpoint);
|
||||
return data.data;
|
||||
} catch (error) {
|
||||
@@ -97,7 +97,7 @@ export const searchcategories = async(query) => {
|
||||
|
||||
export const searchstates = async(query) => {
|
||||
try {
|
||||
const endpoint = "/states/find?regex=" + query;
|
||||
const endpoint = "/v1/states/find?regex=" + query;
|
||||
const {data} = await api.get(endpoint);
|
||||
return data.data;
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user