feat: implemnted the property usedTo on the controller
parent
6b9100fd2e
commit
990c6457fe
|
@ -201,7 +201,8 @@ const registerUsage = async (req, res) => {
|
|||
callerId,
|
||||
sessionId,
|
||||
companyId,
|
||||
format
|
||||
format,
|
||||
usedTo
|
||||
|
||||
} = req.body
|
||||
|
||||
|
@ -235,7 +236,8 @@ const registerUsage = async (req, res) => {
|
|||
billingUnit,
|
||||
companyId,
|
||||
total_cost: calculateApiUsage(price, billingUnit, usage),
|
||||
format
|
||||
format,
|
||||
usedTo
|
||||
})
|
||||
|
||||
return res.status(StatusCodes.OK).json({ apiUsage })
|
||||
|
|
|
@ -48,7 +48,7 @@ const apiUsage = new Schema(
|
|||
type: String,
|
||||
enum: ["text", "audio", "image", "video"],
|
||||
},
|
||||
used_to: {
|
||||
usedTo: {
|
||||
type: String,
|
||||
enum: ["stt", "llm", "tts"],
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue