Merge branch 'listing' into develop

# Conflicts:
#	backend/strapi/src/api/note/content-types/note/schema.json
#	frontend/svelte/package-lock.json
#	frontend/svelte/src/routes/editor/+page.svelte
This commit is contained in:
dhain 2022-10-04 10:32:48 +02:00
commit b49a4c3ddf
9 changed files with 154 additions and 123 deletions

View file

@ -1,3 +1,5 @@
import {parseCookies} from "nookies";
/**
* Capitalises first letter of string.
* @param str
@ -18,4 +20,15 @@ export async function bearerFetch(endpoint: string, jwt: string, baseUrl: string
Authorization: `Bearer ${jwt}`
}
});
}
}
const getJwtCookie = () => {
// @ts-ignore
return parseCookies("/").jwt;
};
/**
* JWT Cookie
*/
export const jwt: string = getJwtCookie();

View file

@ -0,0 +1,11 @@
export interface Note {
id: number;
attributes: Attribute;
}
export interface Attribute {
title: string;
content: string;
lastViewed: Date;
}