Skip to content

Conversation

@dylanmartin
Copy link
Collaborator

@dylanmartin dylanmartin commented Apr 28, 2022

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Passes e2e testing
  • Passes lint
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Feature

  • What is the current behavior? (You can also link to an open issue here)
    closes _issue API: revise compspec seed data usage #1303

  • What is the new behavior (if this is a feature change)?
    There are now public routes in the api.
    the devdata script now populates the local dev database with computations pulled from the production api.
    If .json files are present in packages\coinstac-api-server\seed\data those compspecs will override the ones pulled from the api.

@dylanmartin dylanmartin linked an issue Apr 28, 2022 that may be closed by this pull request
@dylanmartin dylanmartin requested a review from rssk May 5, 2022 18:26
@dylanmartin dylanmartin changed the title WIP compspec-seed-data-change compspec-seed-data-change May 5, 2022
path: '/api',
};

// const config = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removeeee


axios.defaults.baseURL = `${config.protocol}://${config.apiServer}:${config.port}${config.path}`;

const query = 'query fetchAllComputations($preprocess: Boolean) {fetchAllComputations(preprocess: $preprocess) {id, computation {type, dockerImage, command, input}, meta { id,name,preprocess }}}';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

multi - line :fithelement:

async function getComputations() {
const computationsFromApi = await fetchAllComputations();
const computationsFromSeedData = await getComputationsFromSeedData();
return [...computationsFromApi, ...computationsFromSeedData];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add comment about merging comps

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be simpler to dedupe here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API: revise compspec seed data usage

3 participants