mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-26 19:06:55 +01:00
14 lines
390 B
TypeScript
14 lines
390 B
TypeScript
import type { Message } from "@/types/messages";
|
|
import kyClient from "./kyClient";
|
|
|
|
export function getMessages() {
|
|
return kyClient.get("messages").json<Message[]>();
|
|
}
|
|
|
|
export function markRead(id: string) {
|
|
return kyClient.patch(`messages/${encodeURI(id)}/readed`).json<Message[]>();
|
|
}
|
|
|
|
export function markAllRead(){
|
|
return kyClient.post(`messages/allReaded`).json<Message[]>();
|
|
} |