import {defineStore} from "pinia";
import {apiGet} from "@/utils/http.js";

export const useLogsStore = defineStore('logs', {
  state: () => ({
    lines: '',
  }),

  actions: {
    async fetchLogsFromServer() {
      if (this.lines) return;
      const response = await apiGet('getLogs');
      this.lines = response.data;
    },
  },
});
