Skip to content

Commit

Permalink
feat: save app instance resource with format
Browse files Browse the repository at this point in the history
closes #2
  • Loading branch information
juancarlosfarah committed May 20, 2019
1 parent 5e3e679 commit c5523e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/actions/appInstanceResources.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
import { flag, getApiContext, isErrorResponse } from './common';
import { showErrorToast } from '../utils/toasts';
import { MISSING_APP_INSTANCE_RESOURCE_ID_MESSAGE } from '../constants/messages';
import { APP_INSTANCE_RESOURCE_FORMAT } from '../config/formats';

const flagGettingAppInstanceResources = flag(
FLAG_GETTING_APP_INSTANCE_RESOURCES
Expand Down Expand Up @@ -90,6 +91,7 @@ const postAppInstanceResource = async ({ data, userId, type } = {}) => async (
const body = {
data,
type,
format: APP_INSTANCE_RESOURCE_FORMAT,
appInstance: appInstanceId,
// here you can specify who the resource will belong to
// but applies if the user making the request is an admin
Expand Down
2 changes: 2 additions & 0 deletions src/config/formats.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line import/prefer-default-export
export const APP_INSTANCE_RESOURCE_FORMAT = 'v1';

0 comments on commit c5523e3

Please sign in to comment.