This file contains hidden or 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
name: XcodeGenSample | |
options: | |
bundleIdPrefix: com.frontado | |
deploymentTarget: | |
iOS: 13.0 | |
targets: | |
XcodeGenSample: | |
type: application | |
platform: iOS | |
sources: |
This file contains hidden or 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
name: XcodeGenSample | |
options: | |
bundleIdPrefix: com.frontado | |
deploymentTarget: | |
iOS: 13.0 | |
targets: | |
XcodeGenSample: | |
type: application | |
platform: iOS | |
sources: |
This file contains hidden or 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
name: XcodeGenSample | |
options: | |
bundleIdPrefix: com.frontado | |
deploymentTarget: | |
iOS: 13.0 | |
targets: | |
XcodeGenSample: | |
type: application | |
platform: iOS | |
sources: |
This file contains hidden or 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
import 'source-map-support/register' | |
import { APIGatewayProxyHandler, APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda' | |
import TodoService from '../../services/todoService' | |
export const handler: APIGatewayProxyHandler = async (event: APIGatewayProxyEvent): Promise<APIGatewayProxyResult> => { | |
const id = event.pathParameters.id | |
const todoService = new TodoService() | |
await todoService.deleteTodoById(id) |
This file contains hidden or 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
import 'source-map-support/register' | |
import { APIGatewayProxyHandler, APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda' | |
import TodoService from '../../services/todoService' | |
export const handler: APIGatewayProxyHandler = async (_event: APIGatewayProxyEvent): Promise<APIGatewayProxyResult> => { | |
const todoService = new TodoService() | |
const items = await todoService.getAllTodos(); | |
return { |
This file contains hidden or 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
import 'source-map-support/register' | |
import { APIGatewayProxyHandler, APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda' | |
import TodoService from '../../services/todoService' | |
import { TodoItem } from '../../models/TodoItem' | |
export const handler: APIGatewayProxyHandler = async (event: APIGatewayProxyEvent): Promise<APIGatewayProxyResult> => { | |
const id = event.pathParameters.id | |
const todoService = new TodoService() |
This file contains hidden or 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
import 'source-map-support/register' | |
import { APIGatewayProxyHandler, APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda' | |
import TodoService from '../../services/todoService' | |
export const handler: APIGatewayProxyHandler = async (event: APIGatewayProxyEvent): Promise<APIGatewayProxyResult> => { | |
const { name } = JSON.parse(event.body) | |
const todoService = new TodoService() | |
const todo = await todoService.createTodo(name) |
This file contains hidden or 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
import * as uuid from 'uuid' | |
import TodoRepository from '../repositories/TodoRepository' | |
import { TodoItem } from '../models/TodoItem' | |
export default class TodoService { | |
todoRepository: TodoRepository; |
This file contains hidden or 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
import * as AWS from 'aws-sdk' | |
import { DocumentClient } from 'aws-sdk/clients/dynamodb' | |
import { TodoItem } from '../models/TodoItem' | |
export default class TodoRepository { | |
constructor( | |
private readonly docClient: DocumentClient = createDynamoDBClient(), | |
private readonly todoTable = process.env.TODOS_TABLE) { |
This file contains hidden or 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
import * as AWS from 'aws-sdk' | |
import 'source-map-support/register' | |
import { APIGatewayProxyEvent, APIGatewayProxyResult } from 'aws-lambda' | |
import * as uuid from 'uuid' | |
import { TodoItem } from '../../models/TodoItem' | |
export const handler = async (event: APIGatewayProxyEvent): Promise<APIGatewayProxyResult> => { | |
const { name } = JSON.parse(event.body); | |
const id = uuid.v4(); |