Sha256: dca5188c9933158503dde48607b30290e57ff98850448b176d87b261c4b8f62a

Contents?: true

Size: 428 Bytes

Versions: 4

Compression:

Stored size: 428 Bytes

Contents

import { Controller } from '@hotwired/stimulus'

import { fetchWithErrorHandling, fetchTurboStream } from '../core/fetch'

export default class extends Controller {
  fetch (url, options = {}) {
    return fetchWithErrorHandling(url, options)
  }

  fetchTurboStream (url, options = {}) {
    return fetchTurboStream(url, options)
  }

  get csrfToken () {
    return document.querySelector("[name='csrf-token']").content
  }
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trestle-0.10.1 frontend/js/controllers/application_controller.js
trestle-0.10.0 frontend/js/controllers/application_controller.js
trestle-0.10.0.pre2 frontend/js/controllers/application_controller.js
trestle-0.10.0.pre frontend/js/controllers/application_controller.js