From 7a3397f97861a391877908ebce3e3762fc71e7ca Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Mon, 3 May 2021 12:21:51 +0200 Subject: [PATCH] always encrypt content --- client/src/lib/api.ts | 3 +- client/src/lib/views/Create.svelte | 33 ++++++------------- client/src/routes/about.svelte | 2 +- .../{[id].svelte => [id]/[password].svelte} | 32 +++++++----------- src/note/model.rs | 5 +-- src/note/routes.rs | 6 +--- 6 files changed, 26 insertions(+), 55 deletions(-) rename client/src/routes/note/{[id].svelte => [id]/[password].svelte} (71%) diff --git a/client/src/lib/api.ts b/client/src/lib/api.ts index aa89a89..912383d 100644 --- a/client/src/lib/api.ts +++ b/client/src/lib/api.ts @@ -5,11 +5,10 @@ const base = axios.create({ baseURL: dev ? 'http://localhost:5000' : undefined } export type Note = { contents: string - password: boolean views?: number expiration?: number } -export type NoteInfo = Pick +export type NoteInfo = {} export type NotePublic = Pick export async function create(note: Note) { diff --git a/client/src/lib/views/Create.svelte b/client/src/lib/views/Create.svelte index ad0e7c3..06c8c3a 100644 --- a/client/src/lib/views/Create.svelte +++ b/client/src/lib/views/Create.svelte @@ -1,7 +1,7 @@ {#if result} - {#if result.password} - -
- {/if} - +
{:else} @@ -112,15 +108,6 @@ max={360} /> -
-