feat: Add pino-pretty logging and update SunoApi methods
Introduce pino-pretty for improved logging and update SunoApi methods to incorporate new functionalities for generating custom audios, retrieving audio information, and obtaining credit details. The new pino-pretty logging enhances readability and provides better insights into application behavior. These changes align with the broader goal of enhancing developer experience and maintaining application stability. #N/A
This commit is contained in:
@@ -5,10 +5,10 @@ export async function GET(req: NextRequest) {
|
||||
if (req.method === 'GET') {
|
||||
try {
|
||||
// 调用 SunoApi.get_limit 方法获取剩余的信用额度
|
||||
const limit = await SunoApi.get_limit();
|
||||
const limit = await SunoApi.get_credits();
|
||||
|
||||
// 使用 NextResponse 构建成功响应
|
||||
return new NextResponse(JSON.stringify({ limit }), {
|
||||
return new NextResponse(JSON.stringify(limit), {
|
||||
status: 200,
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user