!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/aws_s3/src/controllers/   drwxr-xr-x
Free 13 GB of 57.97 GB (22.42%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     invoiceController.js (1.65 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import { generateInvoice } from "../models/invoiceModel.js";
// import { invoiceQueue } from "../config/redisQueue.js";

// // Process Invoice Queue
// invoiceQueue.process(async (job, done) => {
//   const { folder_name, invoice_no, sale_id } = job.data;
//   const result = await generateInvoice(folder_name, invoice_no, sale_id);
//   if (result === "error") {
//     done(new Error("Invoice generation failed"));
//   } else {
//     done();
//   }
// });

// API Endpoint: Generate Invoice
export const createInvoice = async (req, res) => {
  try {
    const { folder_name, invoice_no, sale_id } = req.body;

    if (!folder_name || !invoice_no || !sale_id) {
      // return res.status(400).json({ error: "Missing required fields" });
      res.locals.data={"error":"true","message":"Missing required fields"};
      res.status(400).json(res.locals.data);
    }

    const result = await generateInvoice(folder_name, invoice_no, sale_id);
    if (result.error) {      
      res.locals.data={"error":"true","message":result.message};
      return res.status(500).json({"error":"true", "message":"Something is wrong, Please try again"});
    }
    // invoiceQueue.add({ folder_name, invoice_no, sale_id }, {
    //   removeOnComplete: true,
    //   removeOnFail: true,
    //   attempts: 3,
    //   backoff: { type: "exponential", delay: 5000 },
    // });

    res.locals.data={"message":"Invoice generated"};
    res.status(200).json(res.locals.data);
  } catch (error) {
    res.locals.data={"error":"true","message":err.message};
    res.status(500).json({"error":"true", "message":"Something is wrong, Please try again"});
  }
};

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0044 ]--