Update language setting and versions in several packages
This commit includes an update of the language setting in the DocsPage and BlogPage functions in the marketing app to make it more dynamic. Additionally, the package versions of next, @makerkit/data-loader-supabase-nextjs, and various Next packages in the Supabase package have been updated.
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
"@tanstack/react-table": "^8.15.3",
|
||||
"@types/react": "^18.2.75",
|
||||
"lucide-react": "^0.363.0",
|
||||
"next": "14.2.0-canary.64",
|
||||
"next": "14.2.0-canary.65",
|
||||
"react": "18.2.0",
|
||||
"react-hook-form": "^7.51.2",
|
||||
"zod": "^3.22.4"
|
||||
|
||||
@@ -5,13 +5,11 @@ import { getSupabaseServerActionClient } from '@kit/supabase/server-actions-clie
|
||||
import { isSuperAdmin } from './is-super-admin';
|
||||
|
||||
/**
|
||||
* @name enhanceAdminAction
|
||||
* @name adminAction
|
||||
* @description Wrap a server action to ensure the user is a super admin.
|
||||
* @param fn
|
||||
*/
|
||||
export function enhanceAdminAction<Args, Response>(
|
||||
fn: (params: Args) => Response,
|
||||
) {
|
||||
export function adminAction<Args, Response>(fn: (params: Args) => Response) {
|
||||
return async (params: Args) => {
|
||||
const isAdmin = await isSuperAdmin(getSupabaseServerActionClient());
|
||||
|
||||
@@ -6,7 +6,7 @@ import { redirect } from 'next/navigation';
|
||||
import { enhanceAction } from '@kit/next/actions';
|
||||
import { getSupabaseServerActionClient } from '@kit/supabase/server-actions-client';
|
||||
|
||||
import { enhanceAdminAction } from './enhance-admin-action';
|
||||
import { adminAction } from './admin-action';
|
||||
import {
|
||||
BanUserSchema,
|
||||
DeleteAccountSchema,
|
||||
@@ -21,7 +21,7 @@ import { AdminAuthUserService } from './services/admin-auth-user.service';
|
||||
* @name banUserAction
|
||||
* @description Ban a user from the system.
|
||||
*/
|
||||
export const banUserAction = enhanceAdminAction(
|
||||
export const banUserAction = adminAction(
|
||||
enhanceAction(
|
||||
async ({ userId }) => {
|
||||
const service = getAdminAuthService();
|
||||
@@ -44,7 +44,7 @@ export const banUserAction = enhanceAdminAction(
|
||||
* @name reactivateUserAction
|
||||
* @description Reactivate a user in the system.
|
||||
*/
|
||||
export const reactivateUserAction = enhanceAdminAction(
|
||||
export const reactivateUserAction = adminAction(
|
||||
enhanceAction(
|
||||
async ({ userId }) => {
|
||||
const service = getAdminAuthService();
|
||||
@@ -67,7 +67,7 @@ export const reactivateUserAction = enhanceAdminAction(
|
||||
* @name impersonateUserAction
|
||||
* @description Impersonate a user in the system.
|
||||
*/
|
||||
export const impersonateUserAction = enhanceAdminAction(
|
||||
export const impersonateUserAction = adminAction(
|
||||
enhanceAction(
|
||||
async ({ userId }) => {
|
||||
const service = getAdminAuthService();
|
||||
@@ -84,7 +84,7 @@ export const impersonateUserAction = enhanceAdminAction(
|
||||
* @name deleteUserAction
|
||||
* @description Delete a user from the system.
|
||||
*/
|
||||
export const deleteUserAction = enhanceAdminAction(
|
||||
export const deleteUserAction = adminAction(
|
||||
enhanceAction(
|
||||
async ({ userId }) => {
|
||||
const service = getAdminAuthService();
|
||||
@@ -105,7 +105,7 @@ export const deleteUserAction = enhanceAdminAction(
|
||||
* @name deleteAccountAction
|
||||
* @description Delete an account from the system.
|
||||
*/
|
||||
export const deleteAccountAction = enhanceAdminAction(
|
||||
export const deleteAccountAction = adminAction(
|
||||
enhanceAction(
|
||||
async ({ accountId }) => {
|
||||
const service = getAdminAccountsService();
|
||||
|
||||
Reference in New Issue
Block a user