Skip to content

Commit 6b54497

Browse files
authored
Merge pull request #248 from nitrictech/feature/options-support
Add options as method for api targets.
2 parents e0914e3 + 989d60c commit 6b54497

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/plugins/aws/src/resources/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import { uniq } from 'lodash';
1818
import { StackAPI, constants } from '@nitric/cli-common';
1919
import { NitricComputeAWSLambda } from './compute';
2020

21-
type method = 'get' | 'post' | 'put' | 'patch' | 'delete';
22-
const METHOD_KEYS: method[] = ['get', 'post', 'put', 'patch', 'delete'];
21+
type method = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'options';
22+
const METHOD_KEYS: method[] = ['get', 'post', 'put', 'patch', 'delete', 'options'];
2323

2424
type AwsApiGatewayIntegrationType = 'http' | 'http_proxy' | 'aws' | 'aws_proxy' | 'mock';
2525
type AwsApiGatewayHttpMethods = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';

packages/plugins/azure/src/resources/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ interface NitricApiAzureApiManagementArgs {
2525
services: NitricComputeAzureContainerApp[];
2626
}
2727

28-
type method = 'get' | 'post' | 'put' | 'update' | 'delete' | 'patch';
29-
const METHODS: method[] = ['get', 'post', 'put', 'update', 'delete', 'patch'];
28+
type method = 'get' | 'post' | 'put' | 'update' | 'delete' | 'patch' | 'options';
29+
const METHODS: method[] = ['get', 'post', 'put', 'update', 'delete', 'patch', 'options'];
3030

3131
/**
3232
* Nitric Azure Api Management based API

packages/plugins/gcp/src/resources/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ interface NitricApiGcpApiGatewayArgs {
2424
services: NitricComputeCloudRun[];
2525
}
2626

27-
type method = 'get' | 'post' | 'put' | 'patch' | 'delete';
27+
type method = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'options';
2828

29-
const METHOD_KEYS: method[] = ['get', 'post', 'put', 'patch', 'delete'];
29+
const METHOD_KEYS: method[] = ['get', 'post', 'put', 'patch', 'delete', 'options'];
3030

3131
interface GoogleExtensions {
3232
'x-google-backend': {

0 commit comments

Comments
 (0)