Skip to content

Commit

Permalink
feat: Sessionize import
Browse files Browse the repository at this point in the history
  • Loading branch information
anyulled committed Aug 7, 2024
1 parent 8472d93 commit 93c6f57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/core/setupType/projectApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import OpenfeedbackApi from './openfeedback/OpefeedbackApi'
export const PROJECT_TYPE_HOVERBOARDV2 = 'hoverboardv2'
export const PROJECT_TYPE_JSONURL = 'jsonurl'
export const PROJECT_TYPE_OPENFEEDBACK = 'openfeedbackv1'
export const PROJECT_TYPE_SESSIONIZE = 'sessionize'

const notImplementApi = {
// eslint-disable-next-line no-unused-vars
Expand Down
6 changes: 3 additions & 3 deletions src/core/setupType/sessionize/SessionizeApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { isString } from '../../../utils/stringUtils'

class SessionizeAPI {
constructor(config) {
if (config.jsonUrl !== this.jsonUrl) {
this.jsonUrl = config.jsonUrl
if (config.sessionizeUrl !== this.sessionizeUrl) {
this.sessionizeUrl = config.sessionizeUrl
this.data = null
}
}
Expand All @@ -12,7 +12,7 @@ class SessionizeAPI {
if (this.data) {
return Promise.resolve(this.data)
}
return fetch(this.jsonUrl).then(async (response) => {
return fetch(this.sessionizeUrl).then(async (response) => {
if (response.ok) {
this.data = await response.json()
if (this.data.sessions) {
Expand Down

0 comments on commit 93c6f57

Please sign in to comment.