-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path635d6418.56494099.js
1 lines (1 loc) · 6.52 KB
/
635d6418.56494099.js
1
"use strict";(self.webpackChunkadminforth=self.webpackChunkadminforth||[]).push([[4444],{7867:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>l,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"api/Back/type-aliases/AfterDataSourceResponseFunction","title":"AfterDataSourceResponseFunction()","description":"AfterDataSourceResponseFunction: (params) => Promise\\\\","source":"@site/docs/api/Back/type-aliases/AfterDataSourceResponseFunction.md","sourceDirName":"api/Back/type-aliases","slug":"/api/Back/type-aliases/AfterDataSourceResponseFunction","permalink":"/docs/api/Back/type-aliases/AfterDataSourceResponseFunction","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"apiSidebar","previous":{"title":"AfterCreateSaveFunction","permalink":"/docs/api/Back/type-aliases/AfterCreateSaveFunction"},"next":{"title":"AfterDeleteSaveFunction","permalink":"/docs/api/Back/type-aliases/AfterDeleteSaveFunction"}}');var n=r(4848),c=r(8453);const l={},i="AfterDataSourceResponseFunction()",d={},o=[{value:"Parameters",id:"parameters",level:2},{value:"Returns",id:"returns",level:2},{value:"error?",id:"error",level:3},{value:"ok",id:"ok",level:3}];function a(e){const t={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,c.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"afterdatasourceresponsefunction",children:"AfterDataSourceResponseFunction()"})}),"\n",(0,n.jsxs)(t.blockquote,{children:["\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"AfterDataSourceResponseFunction"}),": (",(0,n.jsx)(t.code,{children:"params"}),") => ",(0,n.jsx)(t.code,{children:"Promise"}),"<",(0,n.jsx)(t.code,{children:"object"}),">"]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Modify response to change how data is returned after fetching from database.\nReturn ok: false and error: string to stop execution and show error message to user. Return ok: true to continue execution."}),"\n",(0,n.jsx)(t.h2,{id:"parameters",children:"Parameters"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Parameter"}),(0,n.jsx)(t.th,{style:{textAlign:"left"},children:"Type"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params"})}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"object"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params.adminUser"})}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.a,{href:"/docs/api/Common/interfaces/AdminUser",children:(0,n.jsx)(t.code,{children:"AdminUser"})})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params.adminforth"})}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.a,{href:"/docs/api/Back/interfaces/IAdminForth",children:(0,n.jsx)(t.code,{children:"IAdminForth"})})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params.extra"})}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"object"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params.extra.body"})}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"any"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params.extra.cookies"})}),(0,n.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,n.jsx)(t.code,{children:"object"}),"[]"]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params.extra.headers"})}),(0,n.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,n.jsx)(t.code,{children:"Record"}),"<",(0,n.jsx)(t.code,{children:"string"}),", ",(0,n.jsx)(t.code,{children:"string"}),">"]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params.extra.query"})}),(0,n.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,n.jsx)(t.code,{children:"Record"}),"<",(0,n.jsx)(t.code,{children:"string"}),", ",(0,n.jsx)(t.code,{children:"string"}),">"]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params.extra.requestUrl"})}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"string"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params.query"})}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"any"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params.resource"})}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.a,{href:"/docs/api/Back/interfaces/AdminForthResource",children:(0,n.jsx)(t.code,{children:"AdminForthResource"})})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"params.response"})}),(0,n.jsx)(t.td,{style:{textAlign:"left"},children:(0,n.jsx)(t.code,{children:"any"})})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"returns",children:"Returns"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"Promise"}),"<",(0,n.jsx)(t.code,{children:"object"}),">"]}),"\n",(0,n.jsx)(t.h3,{id:"error",children:"error?"}),"\n",(0,n.jsxs)(t.blockquote,{children:["\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"optional"})," ",(0,n.jsx)(t.strong,{children:"error"}),": ",(0,n.jsx)(t.code,{children:"string"})]}),"\n"]}),"\n",(0,n.jsx)(t.h3,{id:"ok",children:"ok"}),"\n",(0,n.jsxs)(t.blockquote,{children:["\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"ok"}),": ",(0,n.jsx)(t.code,{children:"boolean"})]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,c.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(a,{...e})}):a(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>l,x:()=>i});var s=r(6540);const n={},c=s.createContext(n);function l(e){const t=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:l(e.components),s.createElement(c.Provider,{value:t},e.children)}}}]);