feat(silo adjustments): added in email if % wrong
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import { tryCatch } from "../../../../globalUtils/tryCatch.js";
|
||||
import { query } from "../../../sqlServer/prodSqlServer.js";
|
||||
import { siloQuery } from "../../../sqlServer/querys/silo/siloQuery.js";
|
||||
|
||||
export const getStockSiloData = async () => {
|
||||
/**
|
||||
* will return the current stock info where the silo is checked
|
||||
*/
|
||||
|
||||
const { data, error } = await tryCatch(query(siloQuery, "Get silo data"));
|
||||
|
||||
if (error) {
|
||||
return {
|
||||
success: false,
|
||||
message: "There was a n error getting the silo data.",
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
success: true,
|
||||
message: "Current silo data from alplastock.",
|
||||
data: data,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user