Separated functions

This commit is contained in:
Patrick Alvin Alcala 2026-01-05 17:34:00 +08:00
parent 75d02cec97
commit 69bd18184a
4 changed files with 19 additions and 2 deletions

View file

@ -1,7 +1,6 @@
import { lazy } from 'solid-js'
import type { RouteDefinition } from '@solidjs/router'
import Index from './pages/IndexPage/Index'
import { lazy } from 'solid-js'
export const routes: RouteDefinition[] = [
{

View file

@ -7,3 +7,5 @@ export { default as postApi } from './postApi.ts';
export { default as statusPopsApi } from './statusPopsApi.ts';
export { default as voidPopsApi } from './voidPopsApi.ts';
export { default as securePassword } from './securePassword.ts';
export { default as saveNewName } from './saveNewName.ts';
export { default as saveNewPassword } from './saveNewPassword.ts';

View file

@ -0,0 +1,8 @@
import { postApi } from './index.ts'
export default async(id: number, name: string) => {
await postApi('update-name', {
data: id,
data2: name
})
}

View file

@ -0,0 +1,8 @@
import { postApi } from './index.ts'
export default async(id: number, password: string) => {
await postApi('update-password', {
data: id,
data2: password
})
}