2.32.1 • Published 2 years ago

twiglet v2.32.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Twiglet

This is a suite of tools used for my private vendor application

Usage

yarn add twiglet or npm install twiglet

Error Handling Example

import { StrapiError } from "twiglet";

module.exports = createCoreController("api::vendor.vendor", ({ strapi }) => ({
  async create(ctx) {
    try {
      const body = ctx.request.body.data;
      const newStore = await strapi.service("api::vendor.vendor").create(body)
      return ctx.send(newStore, 200);
    } catch (error) {
      // Use the StrapiError handler here
      return new StrapiError(ctx, "Something don sup ooo", {service: 'paypal' }).PaymentRequired()
    }
  },
}));
1.14.0

2 years ago

2.29.0

2 years ago

2.25.0

2 years ago

2.27.0

2 years ago

2.11.0

2 years ago

2.30.1

2 years ago

2.32.1

2 years ago

2.6.0

2 years ago

2.30.0

2 years ago

2.8.0

2 years ago

2.19.0

2 years ago

2.17.0

2 years ago

2.13.0

2 years ago

2.20.0

2 years ago

2.22.0

2 years ago

1.15.0

2 years ago

2.28.0

2 years ago

2.24.0

2 years ago

2.26.0

2 years ago

2.31.1

2 years ago

2.3.0

2 years ago

2.12.0

2 years ago

2.5.0

2 years ago

2.10.0

2 years ago

2.7.0

2 years ago

2.9.0

2 years ago

2.18.0

2 years ago

2.14.0

2 years ago

2.21.0

2 years ago

2.23.0

2 years ago

2.1.0

3 years ago

2.0.0

3 years ago

1.9.9

3 years ago

1.9.6

3 years ago

1.9.5

3 years ago

1.9.4

3 years ago

1.9.3

3 years ago

1.9.2

3 years ago

1.9.1

3 years ago

1.9.0

3 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.9

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

0.2.0

3 years ago

1.0.0

5 years ago