rest.ts 245 B

123456789
  1. import {Plugin} from '@nuxt/types'
  2. import {$rest} from "~/services/queries/rest";
  3. const restPlugin: Plugin = (ctx) => {
  4. //Déclare un nouvel accesseur de service via le context Nuxt
  5. ctx.$rest = $rest(ctx.$http)
  6. }
  7. export default restPlugin