|
@@ -9,10 +9,10 @@
|
|
{ path }: PageData,
|
|
{ path }: PageData,
|
|
session: AppSession
|
|
session: AppSession
|
|
) {
|
|
) {
|
|
- const mdResult = await this.fetch("/rules/md");
|
|
|
|
|
|
+ const mdResult = await this.fetch("/rules/md", { credentials: "include" });
|
|
const md = (await mdResult.json()) as Option<MDText, { error: string }>;
|
|
const md = (await mdResult.json()) as Option<MDText, { error: string }>;
|
|
|
|
|
|
- const verifyReusult = await this.fetch("/rules/verify");
|
|
|
|
|
|
+ const verifyReusult = await this.fetch("/rules/verify", { credentials: "include" });
|
|
const verify = (await verifyReusult.json()) as VerifyInfo;
|
|
const verify = (await verifyReusult.json()) as VerifyInfo;
|
|
return {
|
|
return {
|
|
rulesText: md.ok ? md.text : "",
|
|
rulesText: md.ok ? md.text : "",
|
|
@@ -49,6 +49,7 @@
|
|
async function onVerified(e: { key: string }) {
|
|
async function onVerified(e: { key: string }) {
|
|
state = State.Verify;
|
|
state = State.Verify;
|
|
const result = await fetch("/rules/verify", {
|
|
const result = await fetch("/rules/verify", {
|
|
|
|
+ credentials: "include",
|
|
method: "post",
|
|
method: "post",
|
|
headers: {
|
|
headers: {
|
|
Accept: "application/json",
|
|
Accept: "application/json",
|