From ee15e3d0464137ed7cf316ce40cd1a92723ad17a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96zg=C3=BCr=20Adem=20I=C5=9EIKLI?= Date: Mon, 8 Apr 2024 22:33:38 +0200 Subject: [PATCH] Added new version blog post --- docs/blog/2024-04-08-axe-api-v1-3-is-out.md | 54 + docs/blog/BlogIndex.vue | 5 + docs/blog/v030.png | Bin 0 -> 51226 bytes yarn.lock | 1098 ++++++++----------- 4 files changed, 493 insertions(+), 664 deletions(-) create mode 100644 docs/blog/2024-04-08-axe-api-v1-3-is-out.md create mode 100644 docs/blog/v030.png diff --git a/docs/blog/2024-04-08-axe-api-v1-3-is-out.md b/docs/blog/2024-04-08-axe-api-v1-3-is-out.md new file mode 100644 index 0000000..373b6dd --- /dev/null +++ b/docs/blog/2024-04-08-axe-api-v1-3-is-out.md @@ -0,0 +1,54 @@ +# Axe API v1.3 is out! + +`v1.3` comes with one feature and a security upgrades. + +Let's discover it more! + +## `index.ts` file for hook functions + +Hooks and events are a crucial part of Axe API. It allows you to add your application logic to your API in a very efficient and testable way. In this section, we will cover the logic of it. + +A simple hook or event function look like the following example; + +::: code-group + +```ts [app/v1/Hooks/User/onBeforeInsert.ts] +import { IContext } from "axe-api"; + +export default async (context: IContext) => { + // add your custom logic in here +}; +``` + +::: + +Developers had to put hook functions to separate files. It was useful if your logic is too complicated. + +Now developers can put hook functions to `index.ts` file directly. Also, they can use the separated file method at the same time. + +::: code-group + +```ts [app/v1/Hooks/User/index.ts] +import { IContext } from "axe-api"; + +export const onBeforeInsert = async (context: IContext) => { + // add your custom logic in here +}; + +export const onAfterInsert = async (context: IContext) => { + // add your custom logic in here +}; +``` + +::: + +## `v0.30` is in the maintenance + +The maintenance period has begun for the `v0.30` version of Axe API. It will reach EOL at the end of Q3 2024. + +![v0.30](./v030.png) + +You can find the details in the [Versioning Policy +](/upgrading/versioning-policy.html). + +You can use the [Upgrading to v1](/upgrading/v1.html) tutorial to upgrade your APIs. diff --git a/docs/blog/BlogIndex.vue b/docs/blog/BlogIndex.vue index 3ca2b56..67e296c 100644 --- a/docs/blog/BlogIndex.vue +++ b/docs/blog/BlogIndex.vue @@ -1,5 +1,10 @@