Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: roogue/osu-collector-dl
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.7.5
Choose a base ref
...
head repository: roogue/osu-collector-dl
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.7.6
Choose a head ref
  • 3 commits
  • 3 files changed
  • 3 contributors

Commits on Jul 28, 2024

  1. Copy the full SHA
    e71b73c View commit details

Commits on Jul 31, 2024

  1. Merge pull request #21 from Philenst/main

    Utilize versioned user-agent on request
    roogue authored Jul 31, 2024
    Copy the full SHA
    766bf0b View commit details
  2. prettier

    roogue committed Jul 31, 2024
    Copy the full SHA
    ccafe5f View commit details
Showing with 8 additions and 4 deletions.
  1. +1 −1 package.json
  2. +6 −2 src/core/Requestor.ts
  3. +1 −1 src/version.ts
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "osu-collector-dl",
"version": "2.7.5",
"version": "2.7.6",
"main": "./dist/index.js",
"scripts": {
"build": "yarn run clean-folder && yarn run build-app && yarn run cp-build",
8 changes: 6 additions & 2 deletions src/core/Requestor.ts
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@ import { Constant } from "../struct/Constant";
import { Cursors, Json, Mode } from "../types";
import OcdlError from "../struct/OcdlError";
import { CollectionId } from "../struct/Collection";
import { LIB_VERSION } from "../version";

interface FetchCollectionQuery {
perPage?: number;
@@ -72,8 +73,11 @@ export class Requestor {
? Constant.OsuMirrorAltApiUrl
: Constant.OsuMirrorApiUrl) + id.toString();

const res = await fetch(url, { method: "GET" });

const fetchOptions = {
headers: { "User-Agent": `osu-collector-dl/v${LIB_VERSION}` },
method: "GET",
};
const res = await fetch(url, fetchOptions);
return res;
}

2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const LIB_VERSION = "2.7.5";
export const LIB_VERSION = "2.7.6";