Skip to content

Commit f53af6e

Browse files
authored
feat: add adapter for fetching discount codes using event identifier (#3311)
1 parent 14b1158 commit f53af6e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/adapters/discount-code.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import ApplicationAdapter from './application';
2+
import ENV from 'open-event-frontend/config/environment';
3+
4+
export default ApplicationAdapter.extend({
5+
6+
urlForQueryRecord(query) {
7+
if (query && query.code && query.eventIdentifier) {
8+
return `${ENV.APP.apiHost}/v1/events/${query.eventIdentifier}/discount-codes/${query.code}`;
9+
} else {
10+
return this._super(...arguments);
11+
}
12+
}
13+
});

0 commit comments

Comments
 (0)