D3V-Server/backend/models/wg_interface.js

21 lines
453 B
JavaScript
Raw Normal View History

2026-03-07 13:49:44 +00:00
// WireGuard Interface model - simple Knex queries (no Objection.js for simplicity)
// Used directly in internal/wireguard.js via knex
// This file exports table name and basic query helpers
const tableName = "wg_interface";
export default {
tableName,
async get(knex) {
return knex(tableName).first();
},
async update(knex, id, data) {
return knex(tableName).where("id", id).update({
...data,
modified_on: knex.fn.now(),
});
},
};