260322:1648 Correct Coresspondence / Doing RFA / Correct CI
CI Pipeline / build (push) Failing after 12m41s
Build and Deploy / deploy (push) Failing after 2m44s

This commit is contained in:
admin
2026-03-22 16:48:12 +07:00
parent e5deedb42e
commit 11984bfa29
683 changed files with 105251 additions and 29068 deletions
+21 -17
View File
@@ -5,31 +5,35 @@ async function test() {
// Need to login first to get a token for superadmin
const loginRes = await axios.post('http://127.0.0.1:3001/api/auth/login', {
email: 'admin@lcbp3.com',
password: 'password123!' // Using common seed password
password: 'password123!', // Using common seed password
});
const token = loginRes.data.data.access_token;
console.log("Got token");
console.log('Got token');
// Recreate the preview request
const previewRes = await axios.post('http://127.0.0.1:3001/api/document-numbering/preview', {
projectId: 1, // fallback
originatorOrganizationId: "0",
recipientOrganizationId: "0",
correspondenceTypeId: 0,
disciplineId: 0
}, {
headers: {
Authorization: `Bearer ${token}`
const previewRes = await axios.post(
'http://127.0.0.1:3001/api/document-numbering/preview',
{
projectId: 1, // fallback
originatorOrganizationId: '0',
recipientOrganizationId: '0',
correspondenceTypeId: 0,
disciplineId: 0,
},
{
headers: {
Authorization: `Bearer ${token}`,
},
}
});
);
console.log("Status:", previewRes.status);
console.log("Body:", JSON.stringify(previewRes.data, null, 2));
console.log('Status:', previewRes.status);
console.log('Body:', JSON.stringify(previewRes.data, null, 2));
} catch (err) {
if (err.response) {
console.log("Error Status:", err.response.status);
console.log("Error Body:", JSON.stringify(err.response.data, null, 2));
console.log('Error Status:', err.response.status);
console.log('Error Body:', JSON.stringify(err.response.data, null, 2));
} else {
console.error(err);
}