You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing this code I could not get the error if the password is wrong: export default async function getLatestProjectIssue(req: NextApiRequest, res: NextApiResponse) {
try {
const jira = new JiraClient({
// protocol: 'https',
host: process.env.JIRA_HOST as string,
username: process.env.JIRA_EMAIL,
password: process.env.JIRA_API_TOKEN,
apiVersion: process.env.JIRA_API_VERSION,
strictSSL: true
});
var projectKey = "SCRUM"
const issues = await jira.searchJira( project=${projectKey} ORDER BY updated DESC,
{
maxResults: 1, // Only fetch the latest issue
fields: ['summary', 'updated', 'status', 'assignee'],
}
);
res.status(200).json(issues);
} catch (error) {
res.status(500).json({ error: 'Failed to fetch Jira projects' });
}
}``
The text was updated successfully, but these errors were encountered:
When executing this code I could not get the error if the password is wrong:
export
default async function getLatestProjectIssue(req: NextApiRequest, res: NextApiResponse) {try {
const jira = new JiraClient({
// protocol: 'https',
host: process.env.JIRA_HOST as string,
username: process.env.JIRA_EMAIL,
password: process.env.JIRA_API_TOKEN,
apiVersion: process.env.JIRA_API_VERSION,
strictSSL: true
});
var projectKey = "SCRUM"
const issues = await jira.searchJira(
project=${projectKey} ORDER BY updated DESC
,{
maxResults: 1, // Only fetch the latest issue
fields: ['summary', 'updated', 'status', 'assignee'],
}
);
res.status(200).json(issues);
} catch (error) {
res.status(500).json({ error: 'Failed to fetch Jira projects' });
}
}``
The text was updated successfully, but these errors were encountered: