2024-04-26 01:04:45 +02:00
|
|
|
import type { Mastodon } from "megalodon";
|
|
|
|
|
|
2024-04-27 03:28:12 +02:00
|
|
|
type ExtendedDescription = {
|
|
|
|
|
updated_at: string;
|
|
|
|
|
content: string;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const useExtendedDescription = (client: Mastodon | null) => {
|
2024-04-26 01:04:45 +02:00
|
|
|
if (!client) {
|
2024-04-27 03:28:12 +02:00
|
|
|
return ref(null as ExtendedDescription | null);
|
2024-04-26 01:04:45 +02:00
|
|
|
}
|
|
|
|
|
|
2024-04-27 03:28:12 +02:00
|
|
|
const output = ref(null as ExtendedDescription | null);
|
|
|
|
|
|
|
|
|
|
client.client.get("/api/v1/instance/extended_description").then((res) => {
|
|
|
|
|
output.value = res.data;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return output;
|
2024-04-26 01:04:45 +02:00
|
|
|
};
|