Git Product home page Git Product logo

aws-lambda-ts-architecture-example's Introduction

aws-lambda-ts-architecture-example's People

Contributors

munierujp avatar renovate-bot avatar renovate[bot] avatar

Watchers

 avatar

aws-lambda-ts-architecture-example's Issues

Add get method to UserRepository

Add get method (private method) to UserRepository (src/interfaces/dynamodb/UserRepository.ts) and use it in findById method.

export class UserRepository implements repositories.UserRepository {

  async findById (id: string): Promise<User> {
    const user = await this.get({ id })
    return user as User
  }

  private async get (key) {
    const result = await this.db.get({
      TableName: this.tableName,
      Key: key
    }).promise()
    const item = result.Item

    if (item === undefined || isEmpty(item)) {
      throw new UserNotFoundError('user not found')
    }

    return item
  }
}

Add path alias

Before

in src/usecases/userGetter.ts:

import type { User } from '../domain/models'

in test/usecases/userGetter.test.ts:

import type { User } from '../../src/domain/models'

After

~ is alias for root dir.

in src/usecases/userGetter.ts:

import type { User } from '~/domain/models'

in test/usecases/userGetter.test.ts:

import type { User } from '~/domain/models'

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Improve usecase's interface

Before

import { userGetter } from '../usecases'

const executor = new userGetter.Executor({
  userId,
  userRepo
})
const result = await executor.execute()

After

import { UserGetter } from '../usecases'

const userGettter = new UserGetter({ userRepo })
const result = await userGettter.get(userId)

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.


  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.