Skip to content

Instantly share code, notes, and snippets.

@cal0610
Created November 2, 2022 03:31
Show Gist options
  • Save cal0610/f99aa30a0ff2d4358e254e048373fc5e to your computer and use it in GitHub Desktop.
Save cal0610/f99aa30a0ff2d4358e254e048373fc5e to your computer and use it in GitHub Desktop.
attaching an authoriser to the endpoint
store.addMethod('POST', createOneIntegration, { authorizer });
store.addMethod('GET', getAllIntegration, { authorizer });
const singleStore = store.addResource('{id}');
singleStore.addMethod('GET', getOneIntegration, { authorizer });
singleStore.addMethod('PATCH', updateOneIntegration, { authorizer });
singleStore.addMethod('DELETE', deleteOneIntegration, { authorizer });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment