Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Commit

Permalink
feat(extensions): Adds cost center extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryasmi committed Mar 27, 2019
1 parent 78a4353 commit 4cea9d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/extensions/extendWithCostCenter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { baseUrl } from '../statementConstants/extensions';

export function extendWithCostCenter(costCenterId?: string) {
if (costCenterId === undefined) {
return {};
}
return {
[`${baseUrl}/cost-center-id`]: costCenterId,
};
}
2 changes: 1 addition & 1 deletion src/statementConstants/extensions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseUrl = 'http://learninglocker.net/xapi/extensions';
export const baseUrl = 'http://learninglocker.net/xapi/extensions';

export const dueDateExtension = `${baseUrl}/due-date`;
export const booleanResponseExtension = `${baseUrl}/boolean-response`;
Expand Down

0 comments on commit 4cea9d1

Please sign in to comment.