Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 
 
 

33 Zeilen
641 B

  1. <template>
  2. <section class="shadowbox">
  3. <h2>Register</h2>
  4. <account :error="''" @submit="create" />
  5. </section>
  6. </template>
  7. <script setup>
  8. import { ref } from "vue"
  9. import Account from "./account.vue"
  10. function create(user) {
  11. console.log(user)
  12. fetch(`/api/user`,
  13. {method: 'POST',
  14. body: JSON.stringify(user),
  15. headers: {
  16. "Accept": "application/json",
  17. },
  18. }).then(resp => {
  19. console.log(resp)
  20. if (resp.ok) { return resp.json() } else { return resp.text() }
  21. }).then(u => console.log(u))
  22. }
  23. </script>
  24. <style scoped>
  25. section {
  26. max-width: 400px;
  27. margin: auto;
  28. }
  29. </style>