custom

api tùy chỉnh

api.custom<T, K = any>(name, callback)

Parameters

  • name string

  • callback CustomAPICallback<T, K>

Return

void

Types

export type CustomAPIProps<T, K> = {
    ctx: ContextSession;
    utils: FactoryUtils<T>;
    props: K
};
export type CustomAPICallback<T, K> = (props: CustomAPIProps<T, K>) => T | Promise<T>;

Examples

Xây dựng api lấy avatar người dùng.

Last updated