Skip to content

Commit

Permalink
fix records title pr
Browse files Browse the repository at this point in the history
  • Loading branch information
lucastozo committed Mar 9, 2024
1 parent 8b7e926 commit 71ec2fa
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions api/send-changes-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,21 @@ module.exports = async (req, res) =>
const owner = 'lucastozo';
const repo = 'DemonlistBR';
let path;
let message;
switch (dataMode)
{
case 1:
path = 'data/leveldata.json';
message = 'List Changes';
break;
case 2:
path = 'data/playerdata.json';
message = 'Records Changes';
break;
default:
res.status(400).json({ message: 'Modo de dados inválido' });
return;
}
const message = 'List Changes';
const content = Buffer.from(changes).toString('base64');
const branch = 'list-changes-commits';

Expand Down Expand Up @@ -101,7 +103,19 @@ module.exports = async (req, res) =>
});

const horario = new Date().toLocaleString('pt-BR', { timeZone: 'America/Sao_Paulo' });
const title = 'List Changes';
let title;
switch (dataMode)
{
case 1:
title = 'List Changes';
break;
case 2:
title = 'Records Changes';
break;
default:
res.status(400).json({ message: 'Modo de dados inválido' });
return;
}
const bodyPR = `Gerado automaticamente por DLBRauto em ${horario} (SP).\nAlterações feitas por: ${userName}\n\n${changelog}`;
const head = 'list-changes-commits';
const base = 'main';
Expand Down

0 comments on commit 71ec2fa

Please sign in to comment.