split todo backend and frontend

This commit is contained in:
jane 2021-09-22 19:08:53 -04:00
commit c8291e66ac
111 changed files with 27132 additions and 0 deletions

0
src_old/utils/events.js Normal file
View file

View file

View file

@ -0,0 +1 @@
export const API_URL = 'https://dev.j4.pm/api';

31
src_old/utils/stores.js Normal file
View file

@ -0,0 +1,31 @@
import { writable } from 'svelte/store';
import axios from 'axios';
import { API_URL } from './settings';
export const discordUser = writable({});
export const hasSession = () => {
return getCookie('SESSION') != null;
};
function getCookie(name) {
if (!window.document) {
return null;
}
var dc = window.document.cookie;
var prefix = name + '=';
var begin = dc.indexOf('; ' + prefix);
if (begin == -1) {
begin = dc.indexOf(prefix);
if (begin != 0) return null;
} else {
begin += 2;
var end = window.document.cookie.indexOf(';', begin);
if (end == -1) {
end = dc.length;
}
}
// because unescape has been deprecated, replaced with decodeURI
//return unescape(dc.substring(begin + prefix.length, end));
return decodeURI(dc.substring(begin + prefix.length, end));
}

0
src_old/utils/user.js Normal file
View file