20 lines
394 B
TypeScript
20 lines
394 B
TypeScript
import axios from "../http-client"
|
|
import type { RecipientChannel, User } from "../types"
|
|
|
|
export async function me() {
|
|
const response = await axios.get("/users/@me")
|
|
|
|
return response.data as User
|
|
}
|
|
|
|
export async function channels() {
|
|
const response = await axios.get("/users/@me/channels")
|
|
|
|
return response.data as RecipientChannel[]
|
|
}
|
|
|
|
export default {
|
|
me,
|
|
channels
|
|
}
|