Skip to content

Commit ec2a051

Browse files
committed
GET --> POST in api spec
1 parent d55483e commit ec2a051

File tree

5 files changed

+12
-18
lines changed

5 files changed

+12
-18
lines changed

src/packages/next/pages/api/v2/compute/get-log.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
GetComputeServerLogOutputSchema,
1313
} from "lib/api/schema/compute/get-log";
1414

15-
1615
async function handle(req, res) {
1716
try {
1817
res.json(await get(req));
@@ -35,9 +34,9 @@ async function get(req) {
3534

3635
export default apiRoute({
3736
getLog: apiRouteOperation({
38-
method: "GET",
37+
method: "POST",
3938
openApiOperation: {
40-
tags: ["Compute"]
39+
tags: ["Compute"],
4140
},
4241
})
4342
.input({

src/packages/next/pages/api/v2/compute/get-serial-port-output.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ import isCollaborator from "@cocalc/server/projects/is-collaborator";
1313
import { apiRoute, apiRouteOperation } from "lib/api";
1414
import {
1515
GetComputeServerSerialPortOutputInputSchema,
16-
GetComputeServerSerialPortOutputOutputSchema
16+
GetComputeServerSerialPortOutputOutputSchema,
1717
} from "lib/api/schema/compute/get-serial-port-output";
1818

19-
2019
async function handle(req, res) {
2120
try {
2221
res.json(await get(req));
@@ -54,9 +53,9 @@ async function get(req) {
5453

5554
export default apiRoute({
5655
getSerialPortOutput: apiRouteOperation({
57-
method: "GET",
56+
method: "POST",
5857
openApiOperation: {
59-
tags: ["Compute"]
58+
tags: ["Compute"],
6059
},
6160
})
6261
.input({

src/packages/next/pages/api/v2/compute/get-server-title.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ import getParams from "lib/api/get-params";
99
import { apiRoute, apiRouteOperation } from "lib/api";
1010
import {
1111
GetComputeServerTitleInputSchema,
12-
GetComputeServerTitleOutputSchema
12+
GetComputeServerTitleOutputSchema,
1313
} from "lib/api/schema/compute/get-server-title";
1414

15-
1615
async function handle(req, res) {
1716
try {
1817
res.json(await get(req));
@@ -35,9 +34,9 @@ async function get(req) {
3534

3635
export default apiRoute({
3736
getServerTitle: apiRouteOperation({
38-
method: "GET",
37+
method: "POST",
3938
openApiOperation: {
40-
tags: ["Compute"]
39+
tags: ["Compute"],
4140
},
4241
})
4342
.input({

src/packages/next/pages/api/v2/compute/get-servers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async function get(req) {
3939

4040
export default apiRoute({
4141
getServers: apiRouteOperation({
42-
method: "GET",
42+
method: "POST",
4343
openApiOperation: {
4444
tags: ["Compute"]
4545
},

src/packages/next/pages/api/v2/compute/get-templates.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ Get Templates
55
import { getTemplates } from "@cocalc/server/compute/templates";
66

77
import { apiRoute, apiRouteOperation } from "lib/api";
8-
import {
9-
GetComputeServerTemplatesOutputSchema
10-
} from "lib/api/schema/compute/get-templates";
11-
8+
import { GetComputeServerTemplatesOutputSchema } from "lib/api/schema/compute/get-templates";
129

1310
async function handle(_req, res) {
1411
try {
@@ -21,9 +18,9 @@ async function handle(_req, res) {
2118

2219
export default apiRoute({
2320
getTemplates: apiRouteOperation({
24-
method: "GET",
21+
method: "POST",
2522
openApiOperation: {
26-
tags: ["Compute"]
23+
tags: ["Compute"],
2724
},
2825
})
2926
.outputs([

0 commit comments

Comments
 (0)