-
-
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.
- Loading branch information
1 parent
9c7ccab
commit d9c4e87
Showing
11 changed files
with
119 additions
and
15 deletions.
There are no files selected for viewing
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 { Action } from '@stacksjs/actions' | ||
import { Deployment } from '@stacksjs/orm' | ||
|
||
export default new Action({ | ||
name: 'GetDeploymentCount', | ||
description: 'Gets the total number of deployments.', | ||
apiResponse: true, | ||
|
||
async handle() { | ||
return Deployment.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Action } from '@stacksjs/actions' | ||
import { Library } from '@stacksjs/orm' | ||
|
||
export default new Action({ | ||
name: 'GetDownloadCount', | ||
description: 'Gets the total number of downloads.', | ||
apiResponse: true, | ||
|
||
async handle() { | ||
return Library.downloadCount() | ||
}, | ||
}) |
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 { Action } from '@stacksjs/actions' | ||
import { Commit } from '@stacksjs/orm' | ||
|
||
export default new Action({ | ||
name: 'GetRecentCommits', | ||
description: 'Gets recent commits.', | ||
apiResponse: true, | ||
|
||
async handle() { | ||
return Commit.recent(3) | ||
}, | ||
}) |
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 { Action } from '@stacksjs/actions' | ||
import { Deployment } from '@stacksjs/orm' | ||
|
||
export default new Action({ | ||
name: 'GetRecentDeployments', | ||
description: 'Gets recent deployments.', | ||
apiResponse: true, | ||
|
||
async handle() { | ||
return Deployment.recent(3) | ||
}, | ||
}) |
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 { Action } from '@stacksjs/actions' | ||
import { Subscriber } from '@stacksjs/orm' | ||
|
||
export default new Action({ | ||
name: 'GetSubscriberCount', | ||
description: 'Gets the total number of subscribers.', | ||
apiResponse: true, | ||
|
||
async handle() { | ||
return Subscriber.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
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