code clean up, remove frontend sms api??? why was it there at all?? and some cron things
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 4s
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 4s
This commit is contained in:
@@ -28,26 +28,6 @@ export const formatMacAddress = (mac: string): string => {
|
||||
return formatted ? formatted.join("-") : "";
|
||||
};
|
||||
|
||||
export function validateApiKey(request: Request) {
|
||||
// Get API key from environment variable
|
||||
const validApiKey = process.env.CRON_API_KEY;
|
||||
|
||||
if (!validApiKey) {
|
||||
throw new Error("CRON_API_KEY is not configured");
|
||||
}
|
||||
|
||||
// Get API key from request header
|
||||
const apiKey = request.headers.get("x-api-key");
|
||||
|
||||
if (!apiKey) {
|
||||
throw new Error("API key is missing");
|
||||
}
|
||||
|
||||
if (apiKey !== validApiKey) {
|
||||
throw new Error("Invalid API key");
|
||||
}
|
||||
}
|
||||
|
||||
export function shouldShowTopupPaymentInfo(topup: Topup | undefined): boolean {
|
||||
if (!topup) return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user