Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit ee15e3d

Browse files
committed
Added new version blog post
1 parent ac6b45d commit ee15e3d

File tree

4 files changed

+493
-664
lines changed

4 files changed

+493
-664
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Axe API v1.3 is out!
2+
3+
`v1.3` comes with one feature and a security upgrades.
4+
5+
Let's discover it more!
6+
7+
## `index.ts` file for hook functions
8+
9+
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.
10+
11+
A simple hook or event function look like the following example;
12+
13+
::: code-group
14+
15+
```ts [app/v1/Hooks/User/onBeforeInsert.ts]
16+
import { IContext } from "axe-api";
17+
18+
export default async (context: IContext) => {
19+
// add your custom logic in here
20+
};
21+
```
22+
23+
:::
24+
25+
Developers had to put hook functions to separate files. It was useful if your logic is too complicated.
26+
27+
Now developers can put hook functions to `index.ts` file directly. Also, they can use the separated file method at the same time.
28+
29+
::: code-group
30+
31+
```ts [app/v1/Hooks/User/index.ts]
32+
import { IContext } from "axe-api";
33+
34+
export const onBeforeInsert = async (context: IContext) => {
35+
// add your custom logic in here
36+
};
37+
38+
export const onAfterInsert = async (context: IContext) => {
39+
// add your custom logic in here
40+
};
41+
```
42+
43+
:::
44+
45+
## `v0.30` is in the maintenance
46+
47+
The maintenance period has begun for the `v0.30` version of Axe API. It will reach EOL at the end of Q3 2024.
48+
49+
![v0.30](./v030.png)
50+
51+
You can find the details in the [Versioning Policy
52+
](/upgrading/versioning-policy.html).
53+
54+
You can use the [Upgrading to v1](/upgrading/v1.html) tutorial to upgrade your APIs.

docs/blog/BlogIndex.vue

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<script setup lang="ts">
22
const posts = [
3+
{
4+
time: "08 April, 2024",
5+
title: "Axe API v1.3 is out!",
6+
url: "/blog/2024-04-08-axe-api-v1-3-is-out",
7+
},
38
{
49
time: "16 March, 2024",
510
title: "Axe API v1.2 is out!",

docs/blog/v030.png

50 KB
Loading

0 commit comments

Comments
 (0)