-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
11 changed files
with
59 additions
and
15 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { User } from '@stacksjs/orm' | ||
import { Action } from '@stacksjs/actions' | ||
|
||
export default new Action({ | ||
name: 'GetTotalUsers', | ||
description: 'Gets the total number of users.', | ||
apiResponse: true, | ||
|
||
async handle() { | ||
return User.count() | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { route } from '@stacksjs/router' | ||
|
||
/** | ||
* This file is the entry point for your application's Buddy routes. | ||
* The routes defined here are automatically registered. Last but | ||
* not least, beware when deleting these pre-configured routes. | ||
* | ||
* @see https://stacksjs.org/docs/routing | ||
*/ | ||
|
||
await route.get('/versions', 'Actions/Buddy/VersionsAction') // your-domain.com/api/buddy/versions | ||
await route.get('/commands', 'Actions/Buddy/CommandsAction') // your-domain.com/api/buddy/commands |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters