mirror of
https://github.com/koodiklinikka/koodiklinikka.fi.git
synced 2026-01-26 03:14:08 +00:00
* render channel list dynamically based on channel activity * rename slack message markdown transformer * add hashtag before rendered channel names * tune styles and add secondary channel listing * remove emoji-dictionary
23 lines
431 B
TypeScript
23 lines
431 B
TypeScript
import axios from "axios";
|
|
|
|
export interface Channel {
|
|
id: string;
|
|
name: string;
|
|
topic: string;
|
|
num_members: number;
|
|
purpose: {
|
|
value: string;
|
|
creator: string;
|
|
last_set: number;
|
|
};
|
|
messages_today: number;
|
|
unique_members_today: number;
|
|
}
|
|
|
|
export async function getChannels() {
|
|
const response = await axios.get<Channel[]>(
|
|
"http://stats.koodiklinikka.fi/api/channels"
|
|
);
|
|
return response.data;
|
|
}
|