comty.js 0.63.1 → 0.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -42,7 +42,6 @@ if (globalThis.isServerMode) {
42
42
  mainOrigin: origin,
43
43
  baseRequest: null,
44
44
  ws: null,
45
- rest: null,
46
45
  version: _packagejson2.default.version,
47
46
  addons: new (0, _addons2.default)(),
48
47
  })
@@ -35,7 +35,7 @@ var _session = require('../session'); var _session2 = _interopRequireDefault(_se
35
35
  _session2.default.refreshToken = response.data.refreshToken
36
36
 
37
37
  if (typeof callback === "function") {
38
- await callback()
38
+ await callback(response.data)
39
39
  }
40
40
 
41
41
  __comty_shared_state.eventBus.emit("auth:login_success")
@@ -0,0 +1,30 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
+ var _request = require('../../request'); var _request2 = _interopRequireDefault(_request);
3
+
4
+ class E2EModel {
5
+ static async getKeyPair() {
6
+ const response = await _request2.default.call(void 0, {
7
+ method: "GET",
8
+ url: "/users/self/keypair",
9
+ })
10
+
11
+ return response.data
12
+ }
13
+
14
+ // WARNING: updating keypair makes all decryption fail
15
+ static async updateKeyPair(str, { imSure = false } = {}) {
16
+ if (imSure !== true) {
17
+ throw new Error(
18
+ "Missing confirmation to update the keypair. Use `imSure = true` to proceed.",
19
+ )
20
+ }
21
+
22
+ const response = await _request2.default.call(void 0, {
23
+ method: "POST",
24
+ url: "/users/self/keypair",
25
+ data: { str: str },
26
+ })
27
+
28
+ return response.data
29
+ }
30
+ } exports.default = E2EModel;
@@ -2,87 +2,87 @@
2
2
  var _withSettings = require('../../helpers/withSettings'); var _withSettings2 = _interopRequireDefault(_withSettings);
3
3
 
4
4
  class FeedModel {
5
- /**
6
- * Retrieves music feed with optional trimming and limiting.
7
- *
8
- * @param {Object} options - Optional parameters for trimming and limiting the feed
9
- * @param {number} options.trim - The number of items to trim from the feed
10
- * @param {number} options.limit - The maximum number of items to fetch from the feed
11
- * @return {Promise<Object>} The music feed data
12
- */
13
- static async getMusicFeed({ trim, limit } = {}) {
14
- const { data } = await _request2.default.call(void 0, {
15
- method: "GET",
16
- url: `/music/feed/my`,
17
- params: {
18
- trim: _nullishCoalesce(trim, () => ( 0)),
19
- limit: _nullishCoalesce(limit, () => ( _withSettings2.default.get("feed_max_fetch"))),
20
- }
21
- })
5
+ /**
6
+ * Retrieves music feed with optional trimming and limiting.
7
+ *
8
+ * @param {Object} options - Optional parameters for trimming and limiting the feed
9
+ * @param {number} options.page - The number of items to page from the feed
10
+ * @param {number} options.limit - The maximum number of items to fetch from the feed
11
+ * @return {Promise<Object>} The music feed data
12
+ */
13
+ static async getMusicFeed({ page, limit } = {}) {
14
+ const { data } = await _request2.default.call(void 0, {
15
+ method: "GET",
16
+ url: `/music/feed/my`,
17
+ params: {
18
+ page: _nullishCoalesce(page, () => ( 0)),
19
+ limit: _nullishCoalesce(limit, () => ( _withSettings2.default.get("feed_max_fetch"))),
20
+ },
21
+ })
22
22
 
23
- return data
24
- }
23
+ return data
24
+ }
25
25
 
26
- /**
27
- * Retrieves the global music feed with optional trimming and limiting.
28
- *
29
- * @param {Object} options - An object containing optional parameters:
30
- * @param {number} options.trim - The number of items to trim from the feed
31
- * @param {number} options.limit - The maximum number of items to fetch from the feed
32
- * @return {Promise<Object>} The global music feed data
33
- */
34
- static async getGlobalMusicFeed({ trim, limit } = {}) {
35
- const { data } = await _request2.default.call(void 0, {
36
- method: "GET",
37
- url: `/music/feed`,
38
- params: {
39
- trim: _nullishCoalesce(trim, () => ( 0)),
40
- limit: _nullishCoalesce(limit, () => ( _withSettings2.default.get("feed_max_fetch"))),
41
- }
42
- })
26
+ /**
27
+ * Retrieves the global music feed with optional trimming and limiting.
28
+ *
29
+ * @param {Object} options - An object containing optional parameters:
30
+ * @param {number} options.page - The number of items to page from the feed
31
+ * @param {number} options.limit - The maximum number of items to fetch from the feed
32
+ * @return {Promise<Object>} The global music feed data
33
+ */
34
+ static async getGlobalMusicFeed({ page, limit } = {}) {
35
+ const { data } = await _request2.default.call(void 0, {
36
+ method: "GET",
37
+ url: `/music/feed`,
38
+ params: {
39
+ page: _nullishCoalesce(page, () => ( 0)),
40
+ limit: _nullishCoalesce(limit, () => ( _withSettings2.default.get("feed_max_fetch"))),
41
+ },
42
+ })
43
43
 
44
- return data
45
- }
44
+ return data
45
+ }
46
46
 
47
- /**
48
- * Retrieves the timeline feed with optional trimming and limiting.
49
- *
50
- * @param {object} options - Object containing trim and limit properties
51
- * @param {number} options.trim - The number of feed items to trim
52
- * @param {number} options.limit - The maximum number of feed items to retrieve
53
- * @return {Promise<object>} The timeline feed data
54
- */
55
- static async getTimelineFeed({ trim, limit } = {}) {
56
- const { data } = await _request2.default.call(void 0, {
57
- method: "GET",
58
- url: `/posts/feed/timeline`,
59
- params: {
60
- trim: _nullishCoalesce(trim, () => ( 0)),
61
- limit: _nullishCoalesce(limit, () => ( _withSettings2.default.get("feed_max_fetch"))),
62
- }
63
- })
47
+ /**
48
+ * Retrieves the timeline feed with optional trimming and limiting.
49
+ *
50
+ * @param {object} options - Object containing page and limit properties
51
+ * @param {number} options.page - The number of feed items to page
52
+ * @param {number} options.limit - The maximum number of feed items to retrieve
53
+ * @return {Promise<object>} The timeline feed data
54
+ */
55
+ static async getTimelineFeed({ page, limit } = {}) {
56
+ const { data } = await _request2.default.call(void 0, {
57
+ method: "GET",
58
+ url: `/posts/feed/timeline`,
59
+ params: {
60
+ page: _nullishCoalesce(page, () => ( 0)),
61
+ limit: _nullishCoalesce(limit, () => ( _withSettings2.default.get("feed_max_fetch"))),
62
+ },
63
+ })
64
64
 
65
- return data
66
- }
65
+ return data
66
+ }
67
67
 
68
- /**
69
- * Retrieves the posts feed with options to trim and limit the results.
70
- *
71
- * @param {Object} options - An object containing optional parameters for trimming and limiting the feed.
72
- * @param {number} options.trim - The number of characters to trim the feed content.
73
- * @param {number} options.limit - The maximum number of posts to fetch from the feed.
74
- * @return {Promise<Object>} The posts feed data.
75
- */
76
- static async getGlobalTimelineFeed({ trim, limit } = {}) {
77
- const { data } = await _request2.default.call(void 0, {
78
- method: "GET",
79
- url: `/posts/feed/global`,
80
- params: {
81
- trim: _nullishCoalesce(trim, () => ( 0)),
82
- limit: _nullishCoalesce(limit, () => ( _withSettings2.default.get("feed_max_fetch"))),
83
- }
84
- })
68
+ /**
69
+ * Retrieves the posts feed with options to page and limit the results.
70
+ *
71
+ * @param {Object} options - An object containing optional parameters for trimming and limiting the feed.
72
+ * @param {number} options.page - The number of characters to page the feed content.
73
+ * @param {number} options.limit - The maximum number of posts to fetch from the feed.
74
+ * @return {Promise<Object>} The posts feed data.
75
+ */
76
+ static async getGlobalTimelineFeed({ page, limit } = {}) {
77
+ const { data } = await _request2.default.call(void 0, {
78
+ method: "GET",
79
+ url: `/posts/feed/global`,
80
+ params: {
81
+ page: _nullishCoalesce(page, () => ( 0)),
82
+ limit: _nullishCoalesce(limit, () => ( _withSettings2.default.get("feed_max_fetch"))),
83
+ },
84
+ })
85
85
 
86
- return data
87
- }
88
- } exports.default = FeedModel;
86
+ return data
87
+ }
88
+ } exports.default = FeedModel;
@@ -0,0 +1,25 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _request = require('../../../request'); var _request2 = _interopRequireDefault(_request);
2
+
3
+ exports. default = async (type, item_id) => {
4
+ if (!type) {
5
+ throw new Error("type is required")
6
+ }
7
+
8
+ if (!item_id) {
9
+ throw new Error("item_id is required")
10
+ }
11
+
12
+ type = type.toLowerCase()
13
+
14
+ const response = await _request2.default.call(void 0, {
15
+ method: "GET",
16
+ url: `/music/my/library/favorite`,
17
+ params: {
18
+ kind: type,
19
+ item_id: item_id,
20
+ },
21
+ })
22
+
23
+ // @ts-ignore
24
+ return response.data
25
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _request = require('../../../request'); var _request2 = _interopRequireDefault(_request);
2
+ var _processWithAddons = require('../../../helpers/processWithAddons'); var _processWithAddons2 = _interopRequireDefault(_processWithAddons);
3
+ var _standartListMerge = require('../../../utils/standartListMerge'); var _standartListMerge2 = _interopRequireDefault(_standartListMerge);
4
+
5
+ exports. default = async ({ limit = 100, offset = 0, order = "desc", kind }) => {
6
+ const addons = __comty_shared_state.addons.getByOperation("getMyLibrary")
7
+
8
+ const dividedLimit = limit / (addons.length + 1)
9
+
10
+ const { data } = await _request2.default.call(void 0, {
11
+ method: "GET",
12
+ url: "/music/my/library",
13
+ params: {
14
+ limit: dividedLimit,
15
+ offset: offset,
16
+ order: order,
17
+ kind: kind,
18
+ },
19
+ })
20
+
21
+ let results = await _processWithAddons2.default.call(void 0, {
22
+ operation: "getMyLibrary",
23
+ initialData: data,
24
+ fnArguments: [{ limit: dividedLimit, offset: offset, order: order }],
25
+ normalizeAddonResult: ({ currentData, addonResult }) => {
26
+ return _standartListMerge2.default.call(void 0, currentData, addonResult)
27
+ },
28
+ })
29
+
30
+ // sort tracks by liked_at
31
+ if (results.tracks) {
32
+ results.tracks.items.sort((a, b) => {
33
+ if (a.liked_at > b.liked_at) {
34
+ return -1
35
+ }
36
+ if (a.liked_at < b.liked_at) {
37
+ return 1
38
+ }
39
+ return 0
40
+ })
41
+ }
42
+
43
+ return results
44
+ }
@@ -6,21 +6,17 @@
6
6
 
7
7
 
8
8
 
9
- exports. default = async ({
10
- limit,
11
- offset,
12
- keywords,
13
- }) => {
14
- const response = await _request2.default.call(void 0, {
15
- method: "GET",
16
- url: "/music/releases/self",
17
- params: {
18
- limit: limit,
19
- offset: offset,
20
- keywords: keywords,
21
- }
22
- })
23
-
24
- // @ts-ignore
25
- return response.data
26
- }
9
+ exports. default = async ({ limit, offset, keywords }) => {
10
+ const response = await _request2.default.call(void 0, {
11
+ method: "GET",
12
+ url: "/music/my/releases",
13
+ params: {
14
+ limit: limit,
15
+ offset: offset,
16
+ keywords: keywords,
17
+ },
18
+ })
19
+
20
+ // @ts-ignore
21
+ return response.data
22
+ }
@@ -6,24 +6,17 @@
6
6
 
7
7
 
8
8
 
9
-
10
- exports. default = async ({
11
- keywords,
12
- user_id,
13
- limit,
14
- offset,
15
- }) => {
16
- const response = await _request2.default.call(void 0, {
17
- method: "GET",
18
- url: "/music/releases",
19
- params: {
20
- keywords: keywords,
21
- user_id: user_id,
22
- limit: limit,
23
- offset: offset,
24
- }
25
- })
26
-
27
- // @ts-ignore
28
- return response.data
29
- }
9
+ exports. default = async ({ user_id, limit, page }) => {
10
+ const response = await _request2.default.call(void 0, {
11
+ method: "GET",
12
+ url: "/music/releases",
13
+ params: {
14
+ user_id: user_id,
15
+ limit: limit,
16
+ page: page,
17
+ },
18
+ })
19
+
20
+ // @ts-ignore
21
+ return response.data
22
+ }
@@ -9,23 +9,23 @@
9
9
 
10
10
 
11
11
  exports. default = async (
12
- id,
13
- options = {
14
- preferTranslation: false,
15
- }
12
+ id,
13
+ options = {
14
+ preferTranslation: false,
15
+ },
16
16
  ) => {
17
- const requestParams = Object()
17
+ const requestParams = Object()
18
18
 
19
- if (options.preferTranslation) {
20
- requestParams.translate_lang = app.cores.settings.get("app:language")
21
- }
19
+ if (options.preferTranslation) {
20
+ requestParams.translate_lang = app.cores.settings.get("app:language")
21
+ }
22
22
 
23
- const response = await _request2.default.call(void 0, {
24
- method: "GET",
25
- url: `/music/lyrics/${id}`,
26
- params: requestParams
27
- })
23
+ const response = await _request2.default.call(void 0, {
24
+ method: "GET",
25
+ url: `/music/tracks/${id}/lyrics`,
26
+ params: requestParams,
27
+ })
28
28
 
29
- // @ts-ignore
30
- return response.data
31
- }
29
+ // @ts-ignore
30
+ return response.data
31
+ }
@@ -6,24 +6,17 @@
6
6
 
7
7
 
8
8
 
9
-
10
- exports. default = async ({
11
- keywords,
12
- user_id,
13
- limit,
14
- offset,
15
- }) => {
16
- const response = await _request2.default.call(void 0, {
17
- method: "GET",
18
- url: "/music/tracks",
19
- params: {
20
- keywords: keywords,
21
- user_id: user_id,
22
- limit: limit,
23
- offset: offset,
24
- }
25
- })
26
-
27
- // @ts-ignore
28
- return response.data
29
- }
9
+ exports. default = async ({ user_id, limit, page }) => {
10
+ const response = await _request2.default.call(void 0, {
11
+ method: "GET",
12
+ url: "/music/tracks",
13
+ params: {
14
+ user_id: user_id,
15
+ limit: limit,
16
+ page: page,
17
+ },
18
+ })
19
+
20
+ // @ts-ignore
21
+ return response.data
22
+ }
@@ -2,150 +2,37 @@
2
2
  var _setters = require('./setters'); var _setters2 = _interopRequireDefault(_setters);
3
3
 
4
4
  class MusicModel {
5
- static __initStatic() {this.Getters = _getters2.default}
6
- static __initStatic2() {this.Setters = _setters2.default}
7
-
8
- /**
9
- * Performs a search based on the provided keywords, with optional parameters for limiting the number of results and pagination.
10
- *
11
- * @param {string} keywords - The keywords to search for.
12
- * @param {object} options - An optional object containing additional parameters.
13
- * @param {number} options.limit - The maximum number of results to return. Defaults to 5.
14
- * @param {number} options.offset - The offset to start returning results from. Defaults to 0.
15
- * @param {boolean} options.useTidal - Whether to use Tidal for the search. Defaults to false.
16
- * @return {Promise<Object>} The search results.
17
- */
18
- static __initStatic3() {this.search = _getters2.default.search}
19
-
20
- /**
21
- * Retrieves playlist items based on the provided parameters.
22
- *
23
- * @param {Object} options - The options object.
24
- * @param {string} options.playlist_id - The ID of the playlist.
25
- * @param {string} options.service - The service from which to retrieve the playlist items.
26
- * @param {number} options.limit - The maximum number of items to retrieve.
27
- * @param {number} options.offset - The number of items to skip before retrieving.
28
- * @return {Promise<Object>} Playlist items data.
29
- */
30
- static __initStatic4() {this.getPlaylistItems = _getters2.default.PlaylistItems}
31
-
32
- /**
33
- * Retrieves playlist data based on the provided parameters.
34
- *
35
- * @param {Object} options - The options object.
36
- * @param {string} options.playlist_id - The ID of the playlist.
37
- * @param {string} options.service - The service to use.
38
- * @param {number} options.limit - The maximum number of items to retrieve.
39
- * @param {number} options.offset - The offset for pagination.
40
- * @return {Promise<Object>} Playlist data.
41
- */
42
- static __initStatic5() {this.getPlaylistData = _getters2.default.PlaylistData}
43
-
44
- /**
45
- * Retrieves releases based on the provided parameters.
46
- * If user_id is not provided, it will retrieve self authenticated user releases.
47
- *
48
- * @param {object} options - The options for retrieving releases.
49
- * @param {string} options.user_id - The ID of the user.
50
- * @param {string[]} options.keywords - The keywords to filter releases by.
51
- * @param {number} options.limit - The maximum number of releases to retrieve.
52
- * @param {number} options.offset - The offset for paginated results.
53
- * @return {Promise<Object>} - A promise that resolves to the retrieved releases.
54
- */
55
- static __initStatic6() {this.getReleases = _getters2.default.releases}
56
-
57
- /**
58
- * Retrieves self releases.
59
- *
60
- * @param {object} options - The options for retrieving my releases.
61
- * @param {number} options.limit - The maximum number of releases to retrieve.
62
- * @param {number} options.offset - The offset for paginated results.
63
- * @return {Promise<Object>} - A promise that resolves to the retrieved releases.
64
- */
65
- static __initStatic7() {this.getMyReleases = _getters2.default.myReleases}
66
-
67
- /**
68
- * Retrieves release data by ID.
69
- *
70
- * @param {number} id - The ID of the release.
71
- * @return {Promise<Object>} The release data.
72
- */
73
- static __initStatic8() {this.getReleaseData = _getters2.default.releaseData}
74
-
75
- /**
76
- * Retrieves track data for a given ID.
77
- *
78
- * @param {string} id - The ID of the track or multiple IDs separated by commas.
79
- * @return {Promise<Object>} The track data.
80
- */
81
- static __initStatic9() {this.getTrackData = _getters2.default.trackData}
82
-
83
- /**
84
- * Retrieves the official featured playlists.
85
- *
86
- * @return {Promise<Object>} The data containing the featured playlists.
87
- */
88
- static __initStatic10() {this.getFeaturedPlaylists = _getters2.default.featuredPlaylists}
89
-
90
- /**
91
- * Retrieves track lyrics for a given ID.
92
- *
93
- * @param {string} id - The ID of the track.
94
- * @return {Promise<Object>} The track lyrics.
95
- */
96
- static __initStatic11() {this.getTrackLyrics = _getters2.default.trackLyrics}
97
-
98
-
99
- static __initStatic12() {this.putTrackLyrics = _setters2.default.putTrackLyrics}
100
-
101
- /**
102
- * Create or modify a track.
103
- *
104
- * @param {object} TrackManifest - The track manifest.
105
- * @return {Promise<Object>} The result track data.
106
- */
107
- static __initStatic13() {this.putTrack = _setters2.default.putTrack}
108
-
109
- /**
110
- * Create or modify a release.
111
- *
112
- * @param {object} ReleaseManifest - The release manifest.
113
- * @return {Promise<Object>} The result release data.
114
- */
115
- static __initStatic14() {this.putRelease = _setters2.default.putRelease}
116
-
117
- /**
118
- * Deletes a release by its ID.
119
- *
120
- * @param {string} id - The ID of the release to delete.
121
- * @return {Promise<Object>} - A Promise that resolves to the data returned by the API.
122
- */
123
- static __initStatic15() {this.deleteRelease = _setters2.default.deleteRelease}
124
-
125
- /**
126
- * Retrieves the favourite tracks of the current user.
127
- *
128
- * @return {Promise<Object>} The favorite tracks data.
129
- */
130
- static __initStatic16() {this.getFavouriteTracks = null}
131
-
132
- /**
133
- * Retrieves the favourite tracks/playlists/releases of the current user.
134
- *
135
- * @return {Promise<Object>} The favorite playlists data.
136
- */
137
- static __initStatic17() {this.getFavouriteFolder = _getters2.default.favouriteFolder}
138
-
139
- /**
140
- * Toggles the favourite status of a track, playlist or folder.
141
- *
142
- * @param {string} track_id - The ID of the track to toggle the favorite status.
143
- * @throws {Error} If the track_id is not provided.
144
- * @return {Promise<Object>} The response data after toggling the favorite status.
145
- */
146
- static __initStatic18() {this.toggleItemFavourite = _setters2.default.toggleItemFavourite}
147
-
148
- static __initStatic19() {this.isItemFavourited = _getters2.default.isItemFavourited}
149
-
150
- static __initStatic20() {this.getRecentyPlayed = _getters2.default.recentlyPlayed}
151
- } MusicModel.__initStatic(); MusicModel.__initStatic2(); MusicModel.__initStatic3(); MusicModel.__initStatic4(); MusicModel.__initStatic5(); MusicModel.__initStatic6(); MusicModel.__initStatic7(); MusicModel.__initStatic8(); MusicModel.__initStatic9(); MusicModel.__initStatic10(); MusicModel.__initStatic11(); MusicModel.__initStatic12(); MusicModel.__initStatic13(); MusicModel.__initStatic14(); MusicModel.__initStatic15(); MusicModel.__initStatic16(); MusicModel.__initStatic17(); MusicModel.__initStatic18(); MusicModel.__initStatic19(); MusicModel.__initStatic20(); exports.default = MusicModel;
5
+ static __initStatic() {this.Getters = _getters2.default}
6
+ static __initStatic2() {this.Setters = _setters2.default}
7
+
8
+ // track related methods
9
+ static __initStatic3() {this.getMyTracks = null}
10
+ static __initStatic4() {this.getAllTracks = _getters2.default.tracks}
11
+ static __initStatic5() {this.getTrackData = _getters2.default.trackData}
12
+ static __initStatic6() {this.putTrack = _setters2.default.putTrack}
13
+ static __initStatic7() {this.deleteTrack = null}
14
+
15
+ // lyrics related methods
16
+ static __initStatic8() {this.getTrackLyrics = _getters2.default.trackLyrics}
17
+ static __initStatic9() {this.putTrackLyrics = _setters2.default.putTrackLyrics}
18
+
19
+ // release related methods
20
+ static __initStatic10() {this.getMyReleases = _getters2.default.myReleases}
21
+ static __initStatic11() {this.getAllReleases = _getters2.default.releases}
22
+ static __initStatic12() {this.getReleaseData = _getters2.default.releaseData}
23
+ static __initStatic13() {this.putRelease = _setters2.default.putRelease}
24
+ static __initStatic14() {this.deleteRelease = _setters2.default.deleteRelease}
25
+
26
+ // library related methods
27
+ static __initStatic15() {this.getMyLibrary = _getters2.default.library}
28
+ static __initStatic16() {this.toggleItemFavorite = _setters2.default.toggleItemFavorite}
29
+ static __initStatic17() {this.isItemFavorited = _getters2.default.isItemFavorited}
30
+
31
+ // other methods
32
+ static __initStatic18() {this.getRecentyPlayed = _getters2.default.recentlyPlayed}
33
+ static __initStatic19() {this.search = _getters2.default.search}
34
+
35
+ // aliases
36
+ static __initStatic20() {this.toggleItemFavourite = MusicModel.toggleItemFavorite}
37
+ static __initStatic21() {this.isItemFavourited = MusicModel.isItemFavorited}
38
+ } MusicModel.__initStatic(); MusicModel.__initStatic2(); MusicModel.__initStatic3(); MusicModel.__initStatic4(); MusicModel.__initStatic5(); MusicModel.__initStatic6(); MusicModel.__initStatic7(); MusicModel.__initStatic8(); MusicModel.__initStatic9(); MusicModel.__initStatic10(); MusicModel.__initStatic11(); MusicModel.__initStatic12(); MusicModel.__initStatic13(); MusicModel.__initStatic14(); MusicModel.__initStatic15(); MusicModel.__initStatic16(); MusicModel.__initStatic17(); MusicModel.__initStatic18(); MusicModel.__initStatic19(); MusicModel.__initStatic20(); MusicModel.__initStatic21(); exports.default = MusicModel;
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _request = require('../../../request'); var _request2 = _interopRequireDefault(_request);
2
2
 
3
3
  exports. default = async (track_id, data) => {
4
- const response = await _request2.default.call(void 0, {
5
- method: "put",
6
- url: `/music/lyrics/${track_id}`,
7
- data: data,
8
- })
4
+ const response = await _request2.default.call(void 0, {
5
+ method: "put",
6
+ url: `/music/tracks/${track_id}/lyrics`,
7
+ data: data,
8
+ })
9
9
 
10
- // @ts-ignore
11
- return response.data
12
- }
10
+ // @ts-ignore
11
+ return response.data
12
+ }