feat: admin config subscription
This commit is contained in:
@@ -20,9 +20,20 @@ export async function POST(request: NextRequest) {
|
||||
|
||||
const configContent = await response.text();
|
||||
|
||||
// 对 configContent 进行 base58 解码
|
||||
let decodedContent;
|
||||
try {
|
||||
const bs58 = (await import('bs58')).default;
|
||||
const decodedBytes = bs58.decode(configContent);
|
||||
decodedContent = new TextDecoder().decode(decodedBytes);
|
||||
} catch (decodeError) {
|
||||
console.warn('Base58 解码失败,返回原始内容:', decodeError);
|
||||
throw decodeError;
|
||||
}
|
||||
|
||||
return NextResponse.json({
|
||||
success: true,
|
||||
configContent,
|
||||
configContent: decodedContent,
|
||||
message: '配置拉取成功'
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user