mirror of
https://github.com/stoatchat/javascript-client-api.git
synced 2026-07-20 20:15:34 -04:00
Add a route for fetching own bots.
This commit is contained in:
@@ -30,6 +30,19 @@ resource('/bots/create', {
|
||||
)
|
||||
});
|
||||
|
||||
resource('/bots/@me', {
|
||||
get: routeAuthenticated(
|
||||
"Fetch Owned Bots",
|
||||
"Fetch all of your bots.",
|
||||
{
|
||||
...await success("Array of bot objects.", schema`
|
||||
import type { Bot } from './Bots';
|
||||
type ${'MyBots'} = Bot[];
|
||||
`)
|
||||
}
|
||||
)
|
||||
});
|
||||
|
||||
const botParams = {
|
||||
parameters: [
|
||||
await parameter('bot', 'Bot ID', ref("Id"))
|
||||
|
||||
Reference in New Issue
Block a user