refactor(history): 重构播放历史模块,统一命名并迁移代码

将原playback-history模块重命名为history模块,统一所有相关文件的命名空间,移除冗余的重复代码,更新全局模块引用和测试用例接口路径
This commit is contained in:
2026-07-02 17:28:57 +08:00
parent 79aeac7f37
commit 61a00286fb
10 changed files with 34 additions and 29 deletions

View File

@@ -178,7 +178,7 @@ describe('Auth, orders, and playback', () => {
.expect(201);
await request(app.getHttpServer())
.post('/api/app/v1/playback-history')
.post('/api/app/v1/history')
.send({
episodeId: episode.body.data.id,
progressSeconds: 86,
@@ -188,7 +188,7 @@ describe('Auth, orders, and playback', () => {
.expect(401);
await request(app.getHttpServer())
.post('/api/app/v1/playback-history')
.post('/api/app/v1/history')
.set('Authorization', `Bearer ${firstToken}`)
.send({
episodeId: episode.body.data.id,
@@ -199,7 +199,7 @@ describe('Auth, orders, and playback', () => {
.expect(201);
await request(app.getHttpServer())
.post('/api/app/v1/playback-history')
.post('/api/app/v1/history')
.set('Authorization', `Bearer ${firstToken}`)
.send({
episodeId: episode.body.data.id,
@@ -210,7 +210,7 @@ describe('Auth, orders, and playback', () => {
.expect(201);
const firstHistory = await request(app.getHttpServer())
.get('/api/app/v1/playback-history')
.get('/api/app/v1/history')
.set('Authorization', `Bearer ${firstToken}`)
.expect(200);
@@ -234,7 +234,7 @@ describe('Auth, orders, and playback', () => {
});
const secondHistory = await request(app.getHttpServer())
.get('/api/app/v1/playback-history')
.get('/api/app/v1/history')
.set('Authorization', `Bearer ${secondToken}`)
.expect(200);
@@ -280,7 +280,7 @@ describe('Auth, orders, and playback', () => {
.expect(201);
await request(app.getHttpServer())
.post('/api/app/v1/playback-history')
.post('/api/app/v1/history')
.set('Authorization', `Bearer ${login.body.data.accessToken}`)
.send({
episodeId: episode.body.data.id,