0.1.0 • Published 4 years ago

@sankei-arc-shared-components/content-source_site-service-v3 v0.1.0

Weekly downloads
35
License
ISC
Repository
github
Last release
4 years ago

Content Site Service V3: A Sankei Shared Fusion Component

How to make calls to Content API:

Site Service General Conetent API

How do I use it in my Fusion Project?

import source from '@sankei-arc-shared-components/content-source_site-service-v3';

export default {
  ...source,
  transform(data, query) {
    const { section } = query;
    const { _id } = data;
    // The endpoint returns the site data if a section is not found. Instead, we want a 404.
    if (section && section !== _id) throw new RedirectError();
    return data;
  },
};