mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-26 03:24:18 +00:00
Fix lint errors
This commit is contained in:
parent
7c92bb3d7d
commit
169bd3b55f
5 changed files with 8 additions and 10 deletions
|
|
@ -123,8 +123,8 @@ async function addClassicSkinFromBuffer(
|
|||
}
|
||||
|
||||
export async function getSkinType(zip: JSZip): Promise<SkinType> {
|
||||
const classic = (zip.file(/main\.bmp$/i).length > 0)
|
||||
const modern = (zip.file(/skin\.xml$/i).length > 0);
|
||||
const classic = zip.file(/main\.bmp$/i).length > 0;
|
||||
const modern = zip.file(/skin\.xml$/i).length > 0;
|
||||
if (classic && modern) {
|
||||
throw new Error("Skin is both modern and classic.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import SkinModel from "../../data/SkinModel";
|
|||
import { knex } from "../../db";
|
||||
import ModernSkinResolver from "./resolvers/ModernSkinResolver";
|
||||
|
||||
|
||||
export default class ModernSkinsConnection {
|
||||
_first: number;
|
||||
_offset: number;
|
||||
|
|
@ -11,7 +10,7 @@ export default class ModernSkinsConnection {
|
|||
this._offset = offset;
|
||||
}
|
||||
_getQuery() {
|
||||
let query = knex("skins").where({ skin_type: 2 });
|
||||
const query = knex("skins").where({ skin_type: 2 });
|
||||
return query;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import UserContext from "../../../data/UserContext";
|
||||
|
||||
export default class UserResolver {
|
||||
username(_args, { ctx }) {
|
||||
return ctx.username;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,10 @@ const app = createApp({
|
|||
},
|
||||
});
|
||||
app.listen(port, () => {
|
||||
console.log(`Winamp Skin Museum database API app listening on http://localhost:${port}`);
|
||||
console.log(`Explore: http://localhost:${port}/graphql`)
|
||||
console.log(
|
||||
`Winamp Skin Museum database API app listening on http://localhost:${port}`
|
||||
);
|
||||
console.log(`Explore: http://localhost:${port}/graphql`);
|
||||
});
|
||||
|
||||
// Initialize Sentry after we start listening. Any crash at start time will appear in the console and we'll notice.
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export const IS_NOT_README =
|
|||
/(genex\.txt)|(genexinfo\.txt)|(gen_gslyrics\.txt)|(region\.txt)|(pledit\.txt)|(viscolor\.txt)|(winampmb\.txt)|("gen_ex help\.txt)|(mbinner\.txt)$/i;
|
||||
|
||||
export default class SkinModel {
|
||||
constructor(readonly ctx: UserContext, readonly row: SkinRow) { }
|
||||
constructor(readonly ctx: UserContext, readonly row: SkinRow) {}
|
||||
|
||||
static async fromMd5(
|
||||
ctx: UserContext,
|
||||
|
|
@ -222,7 +222,6 @@ export default class SkinModel {
|
|||
return Skins.getSkinUrl(this.row.md5);
|
||||
case "MODERN":
|
||||
return Skins.getModernSkinUrl(this.row.md5);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue