contentsDocuments
Last updated
Was this helpful?
Last updated
Was this helpful?
|-/redux
|
|-/contentsDocuments
|- index.ts
|- contentsDocumentsSlice.ts
|- contentsDocumentsThunks.ts
const initialState: SliceState = {
documents: {},
publicDocuments: {},
isLoadingContentsDocuments: false,
};
getContentsDocumentsByCategory: Retrieves a group of documents links: url o pdf based in the category provided. These documents need the user to be authenticated in the app.
getIsLoadingContentsDocuments: Indicates if the last request to fetch a documents is pending.
getContentsDocumentById: Retrieves the document with link: url based on the id provided. These documents need the user to be authenticated in the app.
getContentsPublicDocumentsByCategory: Retrieves a group of documents links: url o pdf based in the category provided. These documents are not restricted and they have public access.
getContentsPublicDocumentById: Retrieves the document with link: url based on the id provided. These documents are not restricted and they have public access.
This performs the request. This thunk can be called from different modules to fetch documents indicating the category and if the documents are restricted by an authenticated user.
This performs the request. This thunk can be called from different modules to fetch documents indicating the document Id and if the document is restricted a an authenticated user.
This performs the request. This thunk can be called from different modules to fetch documents indicating the category and if the documents have public access.
This performs the request. This thunk can be called from different modules to fetch documents indicating the document Id and if the document has public access.