Skip to content

Commit

Permalink
Merge pull request #5 from Sathishsathi/temp-dev
Browse files Browse the repository at this point in the history
updated the url
  • Loading branch information
RihaanBH-1810 authored Jan 8, 2025
2 parents 44f87fd + b317e18 commit 6b8ee2f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/Contestdetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
import axios from 'axios';
import Contest from './Contest.vue';
import API_URL from '../globals.js';
import globals from '../globals.js';
export default {
name: 'Contestdetails',
Expand All @@ -101,7 +101,7 @@ export default {
// const contestId = this.$route.params.id;
// Make GET request using the emitted URL
axios.get(API_URL + "/api/contest/" + 1)
axios.get(globals.API_URL + "/api/contest/" + 1)
.then(response => {
const data = response.data;
this.administrators = data.adminstrators;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Createcontest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ let pageValidationPass = ref(false);
// API call to get dynamic options based on input
const fetchOptions = async (query) => {
try {
jsonp(`${globals.WIKIPEDIA_API_URL}?action=query&format=json&list=allusers&auprefix=${query}`, null, function (err, data) {
jsonp(`${globals.USER_API_URL}?action=query&format=json&list=allusers&auprefix=${query}`, null, function (err, data) {
if (err) {
console.error(err.message);
} else {
Expand Down Expand Up @@ -201,12 +201,12 @@ const post = async () => {
}
const response = await axios.post(
globals.API_URL + "/contest/create",
globals.API_URL + "/api/contest/create",
{
name: contestInfo.value,
language: contestLang.value,
start_date: startDate.value,
book_names: indexPages.value,
book_names: indexPages.value.trim().replace(/[\n\r]+/g, ''),
end_date: endDate.value,
admins: adminUsernames, // Send selected admins
proofread_points: stov.value,
Expand Down
2 changes: 1 addition & 1 deletion src/globals.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const API_URL = "http://localhost:5000";
const API_URL = "http://127.0.0.1:5000";
const USER_API_URL = "https://en.wikipedia.org/w/api.php";
const WIKISOURCE_API_URL = "https://en.wikisource.org/w/api.php";
export default {
Expand Down

0 comments on commit 6b8ee2f

Please sign in to comment.