Change sik.party addresses to sahkoinsinoorikilta.fi
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
NEXT_PUBLIC_API_URL=https://api.dev.sik.party/api
|
||||
NEXT_PUBLIC_API_URL=https://api.dev.sahkoinsinoorikilta.fi/api
|
||||
@@ -1 +1 @@
|
||||
NEXT_PUBLIC_API_URL=https://api.sika.sik.party/api
|
||||
NEXT_PUBLIC_API_URL=https://api.sahkoinsinoorikilta.fi/api
|
||||
@@ -1 +1 @@
|
||||
NEXT_PUBLIC_API_URL=https://api.dev.sik.party/api
|
||||
NEXT_PUBLIC_API_URL=https://api.dev.sahkoinsinoorikilta.fi/api
|
||||
+2
-2
@@ -108,7 +108,7 @@ deploy:dev:
|
||||
- master
|
||||
environment:
|
||||
name: dev
|
||||
url: dev.sik.party
|
||||
url: dev.sahkoinsinoorikilta.fi
|
||||
variables:
|
||||
DOCKER_HOST: $DEV_CI_DOCKER_HOST
|
||||
DOCKER_TLS_VERIFY: 1
|
||||
@@ -130,7 +130,7 @@ deploy:prod:
|
||||
- production
|
||||
environment:
|
||||
name: production
|
||||
url: sika.sik.party
|
||||
url: prod.sahkoinsinoorikilta.fi
|
||||
when: manual
|
||||
variables:
|
||||
DOCKER_HOST: $CI_DOCKER_HOST
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ COPY public public/
|
||||
COPY types types/
|
||||
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV NEXT_PUBLIC_API_URL=https://api.dev.sik.party/api
|
||||
ENV NEXT_PUBLIC_API_URL=https://api.dev.sahkoinsinoorikilta.fi/api
|
||||
RUN npm run build
|
||||
|
||||
FROM node:14-alpine as server
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ COPY public public/
|
||||
COPY types types/
|
||||
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV NEXT_PUBLIC_API_URL=https://api.sika.sik.party/api
|
||||
ENV NEXT_PUBLIC_API_URL=https://api.sahkoinsinoorikilta.fi/api
|
||||
RUN npm run build
|
||||
|
||||
FROM node:14-alpine as server
|
||||
|
||||
+2
-3
@@ -8,12 +8,11 @@ module.exports = withBundleAnalyzer({
|
||||
target: "server",
|
||||
images: {
|
||||
domains: [
|
||||
"api.sika.sik.party",
|
||||
"api.dev.sik.party",
|
||||
"static.sika.sik.party",
|
||||
"sahkoinsinoorikilta.fi",
|
||||
"prod.sahkoinsinoorikilta.fi",
|
||||
"api.sahkoinsinoorikilta.fi",
|
||||
"static.sahkoinsinoorikilta.fi",
|
||||
"api.dev.sahkoinsinoorikilta.fi",
|
||||
"placehold.it"
|
||||
],
|
||||
},
|
||||
|
||||
@@ -50,7 +50,7 @@ const AdminSidebar: React.FC<AdminSidebarProps> = ({ path }) => (
|
||||
<StyledLink to="/admin/feed" passHref $path={path}>Feed ›</StyledLink>
|
||||
<StyledLink to="/admin/signups" passHref $path={path}>Signup forms ›</StyledLink>
|
||||
<StyledLink to="/admin/jobads" passHref $path={path}>Job advertisements ›</StyledLink>
|
||||
<StyledLink to="https://static.sika.sik.party/admin" passHref $path={path}>Files ›</StyledLink>
|
||||
<StyledLink to="https://static.sahkoinsinoorikilta.fi/admin" passHref $path={path}>Files ›</StyledLink>
|
||||
<StyledLink data-e2e="admin-sidebar-logout" to="/admin/logout" passHref $path={path}>Logout ›</StyledLink>
|
||||
</SideBar>
|
||||
);
|
||||
|
||||
@@ -85,8 +85,8 @@ const FooterContent: React.FC = () => (
|
||||
<div>
|
||||
<Link to="/jaseneksi">Jäseneksi</Link>
|
||||
<Link to="/palaute">Palaute</Link>
|
||||
<Link to="https://static.sika.sik.party">Arkisto</Link>
|
||||
<Link to="https://static.sika.sik.party">Materiaalipankki</Link>
|
||||
<Link to="https://static.sahkoinsinoorikilta.fi">Arkisto</Link>
|
||||
<Link to="https://static.sahkoinsinoorikilta.fi">Materiaalipankki</Link>
|
||||
</div>
|
||||
</Columns>
|
||||
</MarginSpace>
|
||||
|
||||
@@ -12,7 +12,7 @@ const renderNavigationDesktopItems = () => (
|
||||
<NavbarChildLink to="/kilta/toiminta">Toiminta</NavbarChildLink>
|
||||
<NavbarChildLink to="/kilta/fuksi">Fuksi</NavbarChildLink>
|
||||
<NavbarChildLink to="/kilta/kunnia">Kunnianosoitukset</NavbarChildLink>
|
||||
<NavbarChildLink to="https://static.sika.sik.party">Arkisto</NavbarChildLink>
|
||||
<NavbarChildLink to="https://static.sahkoinsinoorikilta.fi">Arkisto</NavbarChildLink>
|
||||
</NavbarDropdownLink>
|
||||
<NavbarDropdownLink to="/opinnot_ja_ura" text="Opinnot ja ura" />
|
||||
<NavbarDropdownLink to="/yritysyhteistyo" text="Yritysyhteistyö" />
|
||||
|
||||
@@ -10,7 +10,7 @@ const renderNavigationMobileItems = () => (
|
||||
<NavbarChildLink to="/kilta/toiminta">Toiminta</NavbarChildLink>
|
||||
<NavbarChildLink to="/kilta/fuksi">Fuksi</NavbarChildLink>
|
||||
<NavbarChildLink to="/kilta/kunnia">Kunnianosoitukset</NavbarChildLink>
|
||||
<NavbarChildLink to="https://static.sika.sik.party">Arkisto</NavbarChildLink>
|
||||
<NavbarChildLink to="https://static.sahkoinsinoorikilta.fi">Arkisto</NavbarChildLink>
|
||||
</NavbarDropdownLink>
|
||||
<NavbarDropdownLink to="/opinnot_ja_ura" text="Opinnot ja ura" exploded />
|
||||
<NavbarDropdownLink to="/yritysyhteistyo" text="Yritysyhteistyö" exploded />
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ export async function generateToken(username: string, password: string): Promise
|
||||
|
||||
export function setTokenCookie(token: string) {
|
||||
Cookies.set("jwt", token);
|
||||
Cookies.set("jwt", token, { domain: ".sik.party" });
|
||||
Cookies.set("jwt", token, { domain: ".sahkoinsinoorikilta.fi" });
|
||||
}
|
||||
|
||||
export function getTokenCookie(): string {
|
||||
@@ -27,7 +27,7 @@ export function getTokenCookie(): string {
|
||||
}
|
||||
|
||||
export function deleteTokenCookie(): void {
|
||||
Cookies.remove("jwt", { domain: ".sik.party" });
|
||||
Cookies.remove("jwt", { domain: ".sahkoinsinoorikilta.fi" });
|
||||
Cookies.remove("jwt");
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import { JobAd } from "@models/JobAd";
|
||||
import JobAdList from "./JobAdList";
|
||||
|
||||
const EXCURSION_RULES = "https://static.sika.sik.party/saannot/excursiosaannot.pdf";
|
||||
const EXCURSION_RULES = "https://static.sahkoinsinoorikilta.fi/saannot/excursiosaannot.pdf";
|
||||
const YTMK_MAIL = "sik-yritys@list.ayy.fi";
|
||||
|
||||
interface CorporatePageViewProps {
|
||||
|
||||
@@ -57,7 +57,7 @@ const FreshmenPageView: React.FC = () => (
|
||||
|
||||
<ImageContainer>
|
||||
<Image
|
||||
src="https://static.sika.sik.party/uus_webi/fuksikipparit.jpg"
|
||||
src="https://static.sahkoinsinoorikilta.fi/uus_webi/fuksikipparit.jpg"
|
||||
alt="Kipparit"
|
||||
layout="responsive"
|
||||
width={0}
|
||||
|
||||
@@ -47,7 +47,7 @@ const StudiesPageView: React.FC = () => (
|
||||
<h6>Alumnien tarinoita</h6>
|
||||
<p>SIKin alumneja löytyy vaikka mistä! Tässä muutama esimerkki erilaisista työtehtävistä ja tarinoista.</p>
|
||||
<Image
|
||||
src="https://static.sika.sik.party/uus_webi/images/original/Ville_Viikari_photo_by_Anni_Hanen_02_Original.jpg"
|
||||
src="https://static.sahkoinsinoorikilta.fi/uus_webi/images/original/Ville_Viikari_photo_by_Anni_Hanen_02_Original.jpg"
|
||||
alt="Ville Viikari"
|
||||
width={300}
|
||||
height={150}
|
||||
|
||||
+58
-38
@@ -1,7 +1,7 @@
|
||||
import { Selector, ClientFunction, RequestLogger } from "testcafe";
|
||||
import axios from "axios";
|
||||
|
||||
const API_URL = "https://api.dev.sik.party/api"
|
||||
const API_URL = "https://api.sahkoinsinoorikilta.fi/api";
|
||||
|
||||
export const getSiteRoot = (): string => process.env.SITE_URL || "http://localhost:3000";
|
||||
export const getPageUrl = ClientFunction(() => window.location.pathname);
|
||||
@@ -9,7 +9,7 @@ export const getPageUrl = ClientFunction(() => window.location.pathname);
|
||||
export const getPostRequestLogger = (url: string) => RequestLogger({ url: `${API_URL}/${url}`, method: "post" }, {
|
||||
// logResponseHeaders: true,
|
||||
logResponseBody: true,
|
||||
stringifyResponseBody: true
|
||||
stringifyResponseBody: true,
|
||||
});
|
||||
|
||||
const openTime = new Date("1994-01-14T22:51:00+02:00");
|
||||
@@ -23,7 +23,7 @@ export const doLogin = async (t: TestController) => {
|
||||
await t.typeText(Selector("#login-username"), USERNAME);
|
||||
await t.typeText(Selector("#login-password"), PASSWORD);
|
||||
await t.click(Selector("#login-submit"));
|
||||
}
|
||||
};
|
||||
|
||||
export async function generateToken(): Promise<string> {
|
||||
const tokenUrl = `${API_URL}/api-token-auth/`;
|
||||
@@ -31,28 +31,48 @@ export async function generateToken(): Promise<string> {
|
||||
try {
|
||||
const resp = await axios.post(tokenUrl, {
|
||||
username: USERNAME,
|
||||
password: PASSWORD
|
||||
password: PASSWORD,
|
||||
});
|
||||
return resp.data["token"];
|
||||
return resp.data.token;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export const generateTestForm = async (jwt: string) => (
|
||||
await createForm({
|
||||
"title_fi": "Testi Ilmo",
|
||||
"title_en": "Test Signup",
|
||||
"visible": true,
|
||||
"quota": 0,
|
||||
"start_time": openTime,
|
||||
"end_time": tomorrow,
|
||||
"email_content": "E2E Test",
|
||||
"questions": [{ "id": "XS_Ox5Rry", "name": "Nimi", "type": "name", "options": [], "required": true }, { "id": "Ve02XSEEx", "name": "S-Posti", "type": "email", "options": [], "required": true }, { "id": "luMqnz5y9", "name": "Olen", "type": "radiobutton", "options": ["Nuori", "Vanha", "Testaaja"] }], "id": 14, "isOpen": true, "schema": { "type": "object", "required": ["XS_Ox5Rry", "Ve02XSEEx"], "properties": { "XS_Ox5Rry": { "type": "string", "title": "Nimi" }, "Ve02XSEEx": { "type": ["string"], "title": "S-Posti", "format": "email", "pattern": "^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$", "default": null }, "luMqnz5y9": { "type": "string", "title": "Olen", "pattern": "^Nuori$|^Vanha$|^Testaaja$", "enum": ["Nuori", "Vanha", "Testaaja"] } } }
|
||||
createForm({
|
||||
title_fi: "Testi Ilmo",
|
||||
title_en: "Test Signup",
|
||||
visible: true,
|
||||
quota: 0,
|
||||
start_time: openTime,
|
||||
end_time: tomorrow,
|
||||
email_content: "E2E Test",
|
||||
questions: [{
|
||||
id: "XS_Ox5Rry", name: "Nimi", type: "name", options: [], required: true,
|
||||
}, {
|
||||
id: "Ve02XSEEx", name: "S-Posti", type: "email", options: [], required: true,
|
||||
}, {
|
||||
id: "luMqnz5y9", name: "Olen", type: "radiobutton", options: ["Nuori", "Vanha", "Testaaja"],
|
||||
}],
|
||||
id: 14,
|
||||
isOpen: true,
|
||||
schema: {
|
||||
type: "object",
|
||||
required: ["XS_Ox5Rry", "Ve02XSEEx"],
|
||||
properties: {
|
||||
XS_Ox5Rry: { type: "string", title: "Nimi" },
|
||||
Ve02XSEEx: {
|
||||
type: ["string"], title: "S-Posti", format: "email", pattern: "^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$", default: null,
|
||||
},
|
||||
luMqnz5y9: {
|
||||
type: "string", title: "Olen", pattern: "^Nuori$|^Vanha$|^Testaaja$", enum: ["Nuori", "Vanha", "Testaaja"],
|
||||
},
|
||||
},
|
||||
},
|
||||
}, jwt)
|
||||
)
|
||||
);
|
||||
|
||||
const formURL = `${API_URL}/signupForm/`;
|
||||
|
||||
@@ -60,7 +80,7 @@ export async function createForm(data, jwt: string) {
|
||||
try {
|
||||
const resp = await axios.post(formURL, data, {
|
||||
headers: {
|
||||
"Authorization": `JWT ${jwt}`,
|
||||
Authorization: `JWT ${jwt}`,
|
||||
},
|
||||
});
|
||||
return resp.data;
|
||||
@@ -74,7 +94,7 @@ export async function deleteForm(id: string, jwt: string) {
|
||||
try {
|
||||
const resp = await axios.delete(`${formURL}${id}/`, {
|
||||
headers: {
|
||||
"Authorization": `JWT ${jwt}`
|
||||
Authorization: `JWT ${jwt}`,
|
||||
},
|
||||
});
|
||||
return resp.data;
|
||||
@@ -85,25 +105,25 @@ export async function deleteForm(id: string, jwt: string) {
|
||||
}
|
||||
|
||||
export const generateTestEvent = async (formIds = [], jwt: string) => (
|
||||
await createEvent({
|
||||
"tags":[1],
|
||||
"visible":true,
|
||||
"start_time": openTime,
|
||||
"end_time": tomorrow,
|
||||
"title_fi":"title_fi",
|
||||
"description_fi":"desc_fi",
|
||||
"content_fi":"content_fi",
|
||||
"location_fi":"location_fi",
|
||||
"title_en":"title_en",
|
||||
"description_en":"desc_en",
|
||||
"content_en":"content_en",
|
||||
"location_en":"location_en",
|
||||
"image":null,
|
||||
"signupForm": formIds,
|
||||
"signup_id": formIds,
|
||||
"tag_id":[1]
|
||||
createEvent({
|
||||
tags: [1],
|
||||
visible: true,
|
||||
start_time: openTime,
|
||||
end_time: tomorrow,
|
||||
title_fi: "title_fi",
|
||||
description_fi: "desc_fi",
|
||||
content_fi: "content_fi",
|
||||
location_fi: "location_fi",
|
||||
title_en: "title_en",
|
||||
description_en: "desc_en",
|
||||
content_en: "content_en",
|
||||
location_en: "location_en",
|
||||
image: null,
|
||||
signupForm: formIds,
|
||||
signup_id: formIds,
|
||||
tag_id: [1],
|
||||
}, jwt)
|
||||
)
|
||||
);
|
||||
|
||||
const eventURL = `${API_URL}/events/`;
|
||||
|
||||
@@ -111,7 +131,7 @@ export async function createEvent(data, jwt: string) {
|
||||
try {
|
||||
const resp = await axios.post(eventURL, data, {
|
||||
headers: {
|
||||
"Authorization": `JWT ${jwt}`,
|
||||
Authorization: `JWT ${jwt}`,
|
||||
},
|
||||
});
|
||||
return resp.data;
|
||||
@@ -125,7 +145,7 @@ export async function deleteEvent(id: string, jwt: string) {
|
||||
try {
|
||||
const resp = await axios.delete(`${eventURL}${id}/`, {
|
||||
headers: {
|
||||
"Authorization": `JWT ${jwt}`
|
||||
Authorization: `JWT ${jwt}`,
|
||||
},
|
||||
});
|
||||
return resp.data;
|
||||
|
||||
Reference in New Issue
Block a user