Skip to content

Commit

Permalink
tired
Browse files Browse the repository at this point in the history
  • Loading branch information
hansputera committed Jul 5, 2021
1 parent cf3a64d commit 3692485
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import BrainlyError from "./error";
import type { Answer, BaseURLObject, BrainlyResponse, CountryList, LanguageList, Question } from "./types";
import RandomUserAgent from "random-useragent";
import Util from "./util";
import { version } from "../package.json";

export default class Brainly {
public version = version;
public clientRequest = (lang: LanguageList) => Got.extend({
prefixUrl: `${this.getBaseURL(this.country)}/graphql`,
headers: {
Expand Down Expand Up @@ -102,7 +104,7 @@ export default class Brainly {

return objects;
} catch (err) {
throw new Error(JSON.stringify(err));
throw new BrainlyError(JSON.stringify(err));
}
}

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"./src/types"
],
"baseUrl": "./src",
"resolveJsonModule": true
},
"exclude": ["node_modules", "dist"],
"include": ["src/**/*.ts", "tests/**/*"]
Expand Down

0 comments on commit 3692485

Please sign in to comment.