forked from OctoWoW/OctoLauncher
14 lines
447 B
TypeScript
14 lines
447 B
TypeScript
import { patchConfig, patchExecutable } from '~main/modules/patcher';
|
|
import Preferences from '~main/modules/preferences';
|
|
import { getClientVersion } from '~main/utils';
|
|
|
|
import { createTRPCRouter, publicProcedure } from '../trpc';
|
|
|
|
export const patcherRouter = createTRPCRouter({
|
|
apply: publicProcedure.mutation(async () => {
|
|
await patchExecutable();
|
|
await patchConfig();
|
|
Preferences.data = { version: await getClientVersion() };
|
|
})
|
|
});
|