upd: json return

This commit is contained in:
2025-11-10 11:35:51 +08:00
parent 9c045f32ea
commit b101c63f8d
2 changed files with 13 additions and 43 deletions

View File

@@ -38,10 +38,7 @@ const PelayananRoute = new Elysia({
}
})
return `
${JSON.stringify(body)}
kategori pelayanan surat sudah dibuat`
return { success: true, message: 'kategori pelayanan surat sudah dibuat' }
}, {
body: t.Object({
name: t.String({ minLength: 1, error: "name harus diisi" }),
@@ -67,10 +64,7 @@ const PelayananRoute = new Elysia({
}
})
return `
${JSON.stringify(body)}
kategori pelayanan surat sudah diperbarui`
return { success: true, message: 'kategori pelayanan surat sudah diperbarui' }
}, {
body: t.Object({
id: t.String({ minLength: 1, error: "id harus diisi" }),
@@ -95,10 +89,7 @@ const PelayananRoute = new Elysia({
}
})
return `
${JSON.stringify(body)}
kategori pelayanan surat sudah dihapus`
return { success: true, message: 'kategori pelayanan surat sudah dihapus' }
}, {
body: t.Object({
id: t.String({ minLength: 1, error: "id harus diisi" }),
@@ -252,10 +243,7 @@ const PelayananRoute = new Elysia({
}
})
return `
${JSON.stringify(body)}
pengaduan sudah dibuat`
return { success: true, message: 'pengajuan surat sudah dibuat' }
}, {
body: t.Object({
idCategory: t.String({ minLength: 1, error: "idCategory harus diisi" }),
@@ -300,10 +288,7 @@ const PelayananRoute = new Elysia({
}
})
return `
${JSON.stringify(body)}
pengajuan surat sudah diperbarui`
return { success: true, message: 'pengajuan surat sudah diperbarui' }
}, {
body: t.Object({
id: t.String({ minLength: 1, error: "id harus diisi" }),