mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
feat(api): user authentication
This commit is contained in:
parent
f14eda16ac
commit
f253a66f86
41 changed files with 657 additions and 338 deletions
7
src/sources/sources.module.ts
Normal file
7
src/sources/sources.module.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { SpotifyModule } from './spotify/spotify.module';
|
||||
|
||||
@Module({
|
||||
imports: [SpotifyModule]
|
||||
})
|
||||
export class SourcesModule {}
|
||||
12
src/sources/spotify/spotify-connection.entity.ts
Normal file
12
src/sources/spotify/spotify-connection.entity.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { Column } from "typeorm";
|
||||
|
||||
export class SpotifyConnection {
|
||||
@Column()
|
||||
id: string;
|
||||
|
||||
@Column()
|
||||
accessToken: string;
|
||||
|
||||
@Column()
|
||||
refreshToken: string;
|
||||
}
|
||||
9
src/sources/spotify/spotify.module.ts
Normal file
9
src/sources/spotify/spotify.module.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { Module } from '@nestjs/common';
|
||||
import { SpotifyService } from './spotify.service';
|
||||
import { SpotifyApiModule } from './spotify-api/spotify-api.module';
|
||||
|
||||
@Module({
|
||||
providers: [SpotifyService],
|
||||
imports: [SpotifyApiModule]
|
||||
})
|
||||
export class SpotifyModule {}
|
||||
18
src/sources/spotify/spotify.service.spec.ts
Normal file
18
src/sources/spotify/spotify.service.spec.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { SpotifyService } from './spotify.service';
|
||||
|
||||
describe('SpotifyService', () => {
|
||||
let service: SpotifyService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [SpotifyService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<SpotifyService>(SpotifyService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
8
src/sources/spotify/spotify.service.ts
Normal file
8
src/sources/spotify/spotify.service.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { Injectable } from '@nestjs/common';
|
||||
import {Interval} from "@nestjs/cron"
|
||||
|
||||
@Injectable()
|
||||
export class SpotifyService {
|
||||
@Interval
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue