-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add page to update view params (#2036)
* Add dev page to update params * Update type * Update place vote event * Update types * Update config * Update config * Cleanup * Fix formulas * Add create endpoint * Render config * Fix name * Check logged state * Add type
- Loading branch information
1 parent
027064a
commit 5a99daa
Showing
6 changed files
with
444 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { BACKEND_HOST } from './index' | ||
import { getHeaders } from './db.utils' | ||
import type { ViewChangeParameters } from './db.types' | ||
|
||
export async function isDev() { | ||
const d = await fetch(`${BACKEND_HOST}/feed/view-change/canChange`, { | ||
method: 'GET', | ||
headers: getHeaders('GET'), | ||
}) | ||
return d.json() | ||
} | ||
|
||
export async function createNewConfig(config: ViewChangeParameters) { | ||
const d = await fetch(`${BACKEND_HOST}/feed/view-change`, { | ||
method: 'POST', | ||
headers: getHeaders('POST'), | ||
body: JSON.stringify({ | ||
...config, | ||
}), | ||
}) | ||
return d.json() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/experiments/src/routes/(feed)/up-down/results/ResultCard.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.