Skip to content

Commit

Permalink
Merge pull request #7 from culturecreates/task/issue-6
Browse files Browse the repository at this point in the history
chore: added draft 1.0
  • Loading branch information
saumier authored Sep 30, 2024
2 parents cdcb931 + a3434e0 commit eb8673d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
/.vscode

# testing
/coverage
Expand Down
2 changes: 1 addition & 1 deletion src/TestBench.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export default class TestBench extends React.Component {
return query;
};

if (manifestVersion?.includes(specVersions["0.3"])) {
if (manifestVersion?.includes(specVersions["v1.0-draft"])) {
return {
queries: [{
...(isCustomType ? { type: this.state.reconCustomType.id } : isNotNoType ? { type: this.state.reconType } : {}),
Expand Down
5 changes: 3 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const specVersions={
"0.2":"0.2",
"0.3":"0.3",
"draft":"draft",
"v1.0-draft":"v1.0-draft",
}
const addParams = (baseUrl, params) => {
let url = new URL(baseUrl);
Expand Down Expand Up @@ -42,7 +43,7 @@ export const postParams = ({
manifestVersion = [specVersions["0.2"]],
}) => {
let currentManifestVersion = specVersions["0.2"];
if(manifestVersion?.includes(specVersions["0.3"])) currentManifestVersion = specVersions["0.3"];
if(manifestVersion?.includes(specVersions["v1.0-draft"])) currentManifestVersion = specVersions["v1.0-draft"];
switch (currentManifestVersion) {

case "0.2":
Expand All @@ -55,7 +56,7 @@ export const postParams = ({
queries,
}),
});
case "0.3":
case "v1.0-draft":
return fetch(url, {
method: "POST",
headers: {
Expand Down

0 comments on commit eb8673d

Please sign in to comment.