Skip to content

Commit

Permalink
chore: some nits
Browse files Browse the repository at this point in the history
  • Loading branch information
ilee2u committed Dec 4, 2024
1 parent 5c3b5cf commit 6a4a2aa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/data/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async function fetchChatResponse(courseId, messageList, unitId, customQueryParam
}

async function fetchLearningAssistantSummary(courseId) {
const url = new URL(`${getConfig().CHAT_RESPONSE_URL}/${courseId}/summary`);
const url = new URL(`${getConfig().CHAT_RESPONSE_URL}/${courseId}/chat-summary`);

const { data } = await getAuthenticatedHttpClient().get(url.href);
return data;
Expand Down
2 changes: 1 addition & 1 deletion src/data/api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('API', () => {

expect(response).toEqual(apiPayload);
expect(mockGet).toHaveBeenCalledTimes(1);
expect(mockGet).toHaveBeenCalledWith(`${CHAT_RESPONSE_URL}/${courseId}/summary`);
expect(mockGet).toHaveBeenCalledWith(`${CHAT_RESPONSE_URL}/${courseId}/chat-summary`);
});
});
});
1 change: 0 additions & 1 deletion src/data/thunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ export function getLearningAssistantSummary(courseId) {
const messageList = rawMessageList
.map(({ timestamp, ...msg }) => ({
...msg,
// NOTE to self: can't store Date() objects in store: https://github.com/reduxjs/redux-toolkit/issues/456
timestamp: new Date(timestamp).toString(), // Parse ISO time to Date()
}));

Expand Down
2 changes: 1 addition & 1 deletion src/widgets/Xpert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Xpert = ({ courseId, contentToolsEnabled, unitId }) => {
dispatch(getLearningAssistantSummary(courseId));
}, [dispatch, courseId]);

// NOTE: This value can be used later on if/when we pass the enrollment mode to this componentn
// NOTE: This value can be used later on if/when we pass the enrollment mode to this component
const isAuditTrialNotExpired = () => { // eslint-disable-line no-unused-vars
const auditTrialExpired = (Date.now() - auditTrial.expirationDate) > 0;
if (auditTrialExpired) {
Expand Down

0 comments on commit 6a4a2aa

Please sign in to comment.