Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fullfabric/public-api",
"version": "1.6.0",
"version": "1.7.0",
"description": "Function wrappers for the FullFabric public API.",
"type": "module",
"browser": "dist/index.js",
Expand Down
64 changes: 0 additions & 64 deletions spec/utils/getPageDigest.spec.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/api/submitEventResponse.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import assert from 'assert'
import { pick } from 'lodash-es'

import checkResponse from '../utils/checkResponse'
import getPageDigest from '../utils/getPageDigest'
import url from '../utils/url'

/**
* Creates a submission to an Event via the API, returning it.
*
* @param {String} eventId An Event ID
* @param {FormData} eventData The data to submit to the event.
* @param {String} [opts.requestId] Customize the requestId used for anti-spam.
* @param {String} [opts.baseUrl] The base URL for the API. Set if different
* from the current location.
* @param {String} [opts.externalDomainToken] A token to include in the request
Expand All @@ -30,12 +28,6 @@ export default async function submitEventResponse(
'eventData must be provided and be a FormData instance'
)

const digest = await getPageDigest({
requestId: opts.requestId,
sourceType: 'event',
sourceId: eventId
})

const urlOpts = {
...pick(opts, ['baseUrl']),
query: { external_domain_token: opts.externalDomainToken }
Expand All @@ -46,7 +38,6 @@ export default async function submitEventResponse(
{
credentials: 'same-origin',
method: 'POST',
headers: { 'X-FF-DIGEST': digest },
body: eventData
}
)
Expand Down
9 changes: 0 additions & 9 deletions src/api/submitForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import assert from 'assert'
import { pick } from 'lodash-es'

import checkResponse from '../utils/checkResponse'
import getPageDigest from '../utils/getPageDigest'
import url from '../utils/url'

/**
* Creates a submission to a Form via the API, returning it.
*
* @param {String} formId A Form ID
* @param {FormData} formData The data to submit to the form.
* @param {String} [opts.requestId] Customize the requestId used for anti-spam.
* @param {String} [opts.baseUrl] The base URL for the API. Set if different
* from the current location.
* @param {String} [opts.externalDomainToken] A token to include in the request
Expand All @@ -26,12 +24,6 @@ export default async function submitForm(formId, formData, opts = {}) {
'formData must be provided and be a FormData instance'
)

const digest = await getPageDigest({
requestId: opts.requestId,
sourceType: 'form',
sourceId: formId
})

const urlOpts = {
...pick(opts, ['baseUrl']),
query: { external_domain_token: opts.externalDomainToken }
Expand All @@ -42,7 +34,6 @@ export default async function submitForm(formId, formData, opts = {}) {
{
credentials: 'same-origin',
method: 'POST',
headers: { 'X-FF-DIGEST': digest },
body: formData
}
)
Expand Down
44 changes: 0 additions & 44 deletions src/utils/getPageDigest.js

This file was deleted.

1 change: 0 additions & 1 deletion src/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { default as getPageDigest } from './getPageDigest'
export { default as checkResponse } from './checkResponse'
export { default as extractHeaders } from './extractHeaders'
export { default as url } from './url'