profile rest
All checks were successful
Deploy / publish-web (push) Successful in 46s

This commit is contained in:
2025-12-26 01:25:14 +06:00
parent a5cda8828f
commit 461cbc6f83
5 changed files with 59 additions and 72 deletions

View File

@@ -21,6 +21,7 @@
</template>
<script setup lang="ts">
import chadApi from '#shared/chad-api'
import { LogOut } from 'lucide-vue-next'
definePageMeta({
@@ -51,8 +52,11 @@ async function save() {
saving.value = true
const updatedMe = await signaling.socket.value?.emitWithAck('updateClient', {
displayName: displayName.value,
const updatedMe = await chadApi('/profile', {
method: 'PATCH',
body: {
displayName: displayName.value,
},
})
setMe({ ...me.value!, displayName: (updatedMe.displayName as string) })