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

Commit 4cea9d1

Browse files
committed
feat(extensions): Adds cost center extension.
1 parent 78a4353 commit 4cea9d1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { baseUrl } from '../statementConstants/extensions';
2+
3+
export function extendWithCostCenter(costCenterId?: string) {
4+
if (costCenterId === undefined) {
5+
return {};
6+
}
7+
return {
8+
[`${baseUrl}/cost-center-id`]: costCenterId,
9+
};
10+
}

src/statementConstants/extensions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const baseUrl = 'http://learninglocker.net/xapi/extensions';
1+
export const baseUrl = 'http://learninglocker.net/xapi/extensions';
22

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

0 commit comments

Comments
 (0)