Create vue models without args
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
name: 'AppPasswordsModel',
|
||||
async list() {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
name: 'ApplinksModel',
|
||||
async list() {
|
||||
|
||||
@@ -64,7 +64,10 @@ function appProgressMessage(app) {
|
||||
return app.message || (app.error ? app.error.message : '');
|
||||
}
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
async function getTask(appId) {
|
||||
let error, result;
|
||||
try {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
async list() {
|
||||
let error, result;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
name: 'CloudronModel',
|
||||
async languages() {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
async getConfig() {
|
||||
let error, result;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
async list() {
|
||||
let error, result;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
async search(actions, search, page, per_page) {
|
||||
let error, result;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
name: 'GroupsModel',
|
||||
async list() {
|
||||
|
||||
@@ -24,7 +24,10 @@ function ab2str(buf) {
|
||||
return String.fromCharCode.apply(null, new Uint16Array(buf));
|
||||
}
|
||||
|
||||
export function create(origin, accessToken, type, id) {
|
||||
export function create(type, id) {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
const INITIAL_STREAM_LINES = 100;
|
||||
|
||||
let eventSource = null;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
async getIpv4Config() {
|
||||
let error, result;
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
import { ROLES } from '../constants.js';
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
name: 'ProfileModel',
|
||||
async logout() {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
async list() {
|
||||
let error, result;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
async memory() {
|
||||
let error, result;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
async getLatestByType(type) {
|
||||
let error, result;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
name: 'TokensModel',
|
||||
async list() {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
async info() {
|
||||
let error, result;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
async getGlobalProfileConfig() {
|
||||
let error, result;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
function create(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
name: 'UsersModel',
|
||||
async list() {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
|
||||
import { fetcher } from 'pankow';
|
||||
|
||||
export function createVolumesModel(origin, accessToken) {
|
||||
function create() {
|
||||
const accessToken = localStorage.token;
|
||||
const origin = import.meta.env.VITE_API_ORIGIN || window.location.origin;
|
||||
|
||||
return {
|
||||
name: 'VolumesModel',
|
||||
async list() {
|
||||
@@ -93,5 +96,5 @@ export function createVolumesModel(origin, accessToken) {
|
||||
}
|
||||
|
||||
export default {
|
||||
createVolumesModel
|
||||
create
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user