Refactor: Rename NanoKVM to BatchuKVM and update server URL
This commit is contained in:
24
web/src/api/hid.ts
Normal file
24
web/src/api/hid.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { http } from '@/lib/http.ts';
|
||||
|
||||
// paste
|
||||
export function paste(content: string, langue: string) {
|
||||
return http.post('/api/hid/paste', { content, langue });
|
||||
}
|
||||
|
||||
// reset hid
|
||||
export function reset() {
|
||||
return http.post('/api/hid/reset');
|
||||
}
|
||||
|
||||
// get hid mode
|
||||
export function getHidMode() {
|
||||
return http.get('/api/hid/mode');
|
||||
}
|
||||
|
||||
// set hid mode
|
||||
export function setHidMode(mode: string) {
|
||||
const data = {
|
||||
mode
|
||||
};
|
||||
return http.post('/api/hid/mode', data);
|
||||
}
|
||||
Reference in New Issue
Block a user