feat(silo attached detach): added in silo attach detach setup in the silo card
This commit is contained in:
@@ -41,15 +41,21 @@ export const postAdjustment = async (data: any, prod: any) => {
|
||||
|
||||
const { data: silo, error } = await tryCatch(
|
||||
axios.post(url, siloAdjustment, {
|
||||
headers: { Authorization: `Basic ${prod}` },
|
||||
headers: {
|
||||
"X-API-Key": process.env.TEC_API_KEY || "",
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
);
|
||||
let e = error as any;
|
||||
if (e) {
|
||||
console.log(e.response);
|
||||
if (e.status === 401) {
|
||||
const data = {
|
||||
success: false,
|
||||
message: "Incorrect alpla prod password.",
|
||||
message: `There was error posting the data: ${JSON.stringify(
|
||||
e.response?.data
|
||||
)}`,
|
||||
data: {
|
||||
status: e.response?.status,
|
||||
statusText: e.response?.statusText,
|
||||
|
||||
Reference in New Issue
Block a user